Login

How to configure mail

Versions: 4.70, FAQ number: 66, Old FAQ number: 1021

Q: How do I configure mail?

A: EPiServer uses the default virtual SMTP server to send mail and subscriptions, so all changes that has to do with the SMTP server is done using the IIS management console.

Using a specific SMTP server

You can tell EPiServer to send mail using another SMTP server by adding the following line to web.config:

<add key="EPsSmtpServer" value="see possible values below" />

The possible values in the value-field:

  • Name or IP number of mailserver
  • If you leave the value field empty, the default SMTP server is used
  • If you setup a smarthost and want EPiServer to send mail using the smarthost you can do that by setting the value to "smarthost"
  • Incase you want explicitly tell EPiServer to use the local SMTP server on the server, set the value to "localhost"

Warning!The subscription function in EPiServer 4.11 ignores the EPsSmtpServer setting in web.config, this is not the case in either newer or older versions.


ASPNET and permissions in the IIS metabase

If EPiServer cannot send any mail due to "sendusing" and "CDO.Message" errors it means that ASPNET does not have permission to read the IIS metabase. The easiest solution is to download ConfigSmtp, a command line program that we wrote to deal with this specific problem. Just run it to solve the problem. The program grants the local ASPNET account rights to read the IIS metabase.

Another way to deal with the problem is to download the Metaacl.vbs script from Microsoft, on the following page: http://support.microsoft.com/default.aspx?scid=KB;EN-US;q267904. Run the script in a console window and give ASPNET permission to read and enumerate the SMTP settings in the IIS metabase, for example (note, "RE" must be uppercase):

MetaACL "IIS://LOCALHOST/SMTPSVC" ASPNET RE

Activate relaying

If you get an error message saying "The server rejected one or more recipient addresses. The server response was: 550 5.7.1 Unable to relay for <email-address>" the reason is most likely that the Smtp server does not allow relaying of mail from the IP address that is trying to send the mail. To solve this, grant relay permissions to the IP address in IIS management console -> Default Smtp Virtual Server properties -> Access tab -> Relay. Note that it can take a few minutes before the changes take effect. Below is an example where the localhost on 127.0.0.1 has been granted relay permissions.

EPiTrace logger