Using Amazon SES to send email from Umbraco

Amazon, via their AWS SES, offer a convenient way to send emails from our Umbraco sites. This is great, as we don't have the headache of managing an SMTP server.

Amazon Configuration

  1. In Amazon AWS account, ensure the account is authorised for 'Production Access' in the region from which you wish to send emails from. You can check this by navigating to AWS > Services > SES > Dashboard which will clearly indicates if the account is 'Sandboxed' or has been granted 'Production Access'. If required, request 'Production Access'.
  2. Sending emails requires the sender to authenticate as the email is sent – this requires an Amazon IAM user. You can use one IAM user account to send all email from a AWS account, but you are not limited to this. In reality we use one IAM user that is shared across our smaller clients, and only create specific IAM user for our larger clients for whom we host/manage multiple applications. If you need to add an IAM user you can do so in AWS > Services > IAM > Users.
  3. You are also required to verify the email address or domain from which you wish to send email from. Verifying email address requires you to reply to an email Amazon send to that email address in question. We prefer to verify a domain, which involves adding a TXT record to the domain's DNS record. email/domain verification is configured at AWS > Services > SES.

Umbraco Configuration

  1. Install Umbraco Contour package, which provides email functionality to Umbraco.
  2. Install Contour Contrib package which adds SSL functionality to Umbraco Contour.
  3. Add <add key="contourContribUseSsl" value="true" /> to the appSettings section of web.config.
  4. Also in web.config but in the mailSettings > smtp section add:
<network 
  host="email-smtp.XX-XXXX-X.amazonaws.com" 
  port="XXX" 
  userName="IAM_USER_NAME" 
  password="IAM_PASSWORD"
/>

It seems enableSsl="true" is no longer required.
5. Add to the notifications section of umbracoSettings.config:

<email>name@some-domain.com</email>

The email address or the domain you enter here must have been verified in the Amazon SES account you are sending from.

More Information