Mail Server Config

Mail Server Config

Mail Configuration Settings in Sitecore

  • Settings used to configure sending emails from the Sitecore server
  • These settings are not used by E-Mail Campaign Manager (ECM) or Web Form For Marketers (WFFM)
  • <configuration>
    • <settings>
      • <setting name="MailServer" value="smtp.yourmailserver.com" /> 
      • <setting name="MailServerUserName" value="youraccount@yourmailserver.com" />
      • <setting name="MailServerPassword" value="youraccountpassword" />
      • <setting name="MailServerPort" value="25" />

MailServer Setting

  • Name of SMTP server used for sending emails by the Sitecore server 
  • Used when developers reference MainUtil.SendMail()
  • Default value is an empty string

MailServerUserName Setting

  • Username to use when the SMTP server requires login
  • Default value is an empty string

MailServerPassword Setting

  • Password to use when the SMTP server requires login
  • Default value is an empty string

MailServerPort Setting

  • Port number to use to communicate with the mail server
  • Sitecore uses the System.Net.Mail.SmtpClient, which uses TLS 
  • Default value is 25 - create an incoming firewall rule for TCP 25 port
  • Use the following settings in order to support Secure Sockets Layer (SSL) for email
    • Set the MailServerPort to 587 for SSL, which supports TLS
    • Create an incoming firewall rule for TCP 587 port

Additional Mail Configuration Settings

  • These settings may need to be added to web.config to support some implementations
  • <configuration>
    • <system.net>
      • <mailSettings>
        • <smtp deliveryMethod="Network" from="youraccount@yourmailserver.com">
          • <network host="smtp.ticdevs.com" userName="youraccount@yourmailserver.com" password="youraccountpassword" enableSsl="true|false" defaultCredentials="true|false" port="25|587" />

Sources