Configure the email server
Explains how to configure an email SMTP server to work with Optimizely Digital Experience Platform (DXP).
This topic explains configuring an email SMTP server to work with Optimizely Digital Experience Platform. For Optimizely 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.Â
DXP provides access to a cloud-based email service for the automated sending of transactional emails for website communication. Optimizely does not automatically apply this configuration through the standard configuration transforms, so add this manually.
Email service account
To get an SMTP user setup, go to the DXP project in the management portal. Under the API tab is an option to generate an API key for SendGrid. This API key, together with username and hostname, should be used to populate the <smtp>
section in web.config
; see the Adding the SMTP email configuration section. After generating a key, save it because you can see it only directly after creation.
Add the SMTP email configuration
Add the following section to the web.config
of your website;Â userName
and Password
is generated through the management portal. See also:Â Authentication (SendGrid article).
<configuration>
<system.net>
<mailSettings>
<smtp from="[email protected]">
<network
host="smtp.sendgrid.net"
password="[API key generated in management portal]"
userName="apikey"
port="[587, 465, 25 or 2525]" />
</smtp>
</mailSettings>
</system.net>
</configuration>
DNS configuration
To send emails from a custom domain, you should configure a Sender Policy Framework (SPF), a type of Domain Name Service (DNS) record that identifies mail servers permitted to send emails on behalf of your domain. Contact Optimizely with the sending domain to assist you with configuration and activating Sender Authentication
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.
- Single entry –
domain.com TXT v=spf1 include:sendgrid.net -all
- Multiple entries –
domain.com TXT v=spf1 include:sendgrid.net include:spf.protection.outlook.com -all
Updated 7 months ago