This topic explains how to configure an email SMTP server to work with Episerver DXP. For Episerver to send out email notifications, configure your email server with a server endpoint that is reachable from the site, and can send emails using a specified from-address.
How it works
DXP provides access to a cloud-based email service for automated sending of transactional emails for website communication. This configuration is not automatically applied by Episerver through the standard configuration transforms, so add this manually.
Email service account
Episerver sets up a an email service account for you, with the required host, username, and password.
Adding the SMTP email configuration
Add the following section to the web.config of your website. Contact firstname.lastname@example.org to obtain the host, password, userName, and port values.
<configuration> <system.net> <mailSettings> <smtp from="email@example.com"> <network host="[provided by Episerver]" password="[API key provided by Episerver]" userName="[provided by Episerver]" port="[587, 465, 25 or 2525]" /> </smtp> </mailSettings> </system.net> </configuration>
To send emails from a custom domain, you should configure a Sender Policy Framework (SPF), which is a type of Domain Name Service (DNS) record that identifies mail servers that are permitted to send emails on behalf of your domain. Episerver will advise on the correct configuration for this.
If you want to use SendGrid to send mail from your domain, add an SPF record to your DNS zones as shown in the following examples.
domain.com TXT v=spf1 include:sendgrid.net -all
domain.com TXT v=spf1 include:sendgrid.net include:spf.protection.outlook.com -all
Last updated: Apr 02, 2020