Set Up Amazon SES for Your WordPress Site


If you’re running a site that sends a lot of emails, like an ecommerce site or a membership site, you already know that it’s critical to have a reliable email service that can keep up with the huge amount of emails that you’re sending out. Sending emails through your existing email provider over SMTP is prone to hitting rate limits, as standard email services like Gmail aren’t designed for the large number of emails that are sent when sending out invoices, password reset emails, and support requests.

There are a ton of services out there that can help with this, but in this article we’re going to be taking a look at Amazon’s offering, Simple Email Service (or SES for short).

Why Use Amazon SES?

One of the biggest draws of Amazon SES is the reasonable pricing. Starting at a flat rate of $0.10 per 1,000 emails, it’s priced very competitively with some of the more well-known sending services.

If your site sends 20,000 emails per month, here’s how it stacks up against some other email services:

Amazon SES – $2.00 per month
Mailgun – $5.00 per month
MailJet – $9.65 per month
SendGrid – $9.95 per month
SendinBlue – $25.00 per month
PostMark – $22.50 per month

With higher sending limits you can save a lot more money. Here’s what 200,000 emails per month costs on the same services:

Amazon SES – $20.00
Mailgun – $139.00
MailJet – $150.26
SendGrid – $164.95
SendinBlue – $173.00
Postmark – $163.75

As you can see, the pricing difference becomes much larger the more you send. Part of the reason for this is that the other services tend to use tiered pricing. This means there may be times where you’re just above one pricing tier but paying for the next highest tier, which may include more emails than you need to send.

It’s also worth mentioning that if you host your site on Amazon EC2, the first 62,000 emails per month are completely free.

Another big advantage of Amazon SES is, well, it runs on Amazon Web Services! They have made a huge impression in cloud computing since starting the Amazon Web Services division in 2002. The services they offer are trusted by some of the largest internet companies, and yet they cater to businesses large and small.

All of this experience results in an extremely reliable platform that provides dozens of services to help you run your online business. And as an added bonus, several of these services can integrate directly with Amazon SES since they are all under one roof:

  • Amazon EC2
  • Amazon Simple Notifications System
  • Amazon S3
  • AWS Cloudtrail

All of these services are highly configurable and have ample documentation on how they can fit together. Since you have full ownership of your account and data, it’s really up to you how you want your application or website to run on Amazon.

Setting Up Your WordPress Site for Amazon SES

Signing Up

First things first, you’ll need to have an account with Amazon Web Services and log in to the AWS console. Once you’re signed up you’ll need to create an Identity and Access Management (IAM for short) user to get your access keys that are used for the SES API – more on that later.

To create an IAM user, go to the Identity and Access Management console and click Users in the sidebar, then click Add User. After adding your new username, check the box for “Programmatic access” so this user can access the AWS APIs.

Adding an IAM user

For permissions, click “Attach existing policies directly” and type in “AmazonSESFullAccess” to grant this user access to all Amazon SES related permissions. After checking the box to enable that, do the same for “AmazonSNSFullAccess” so the user can access services related to Amazon’s notifications system, Amazon SNS.

After creating the user, you’ll be given an access key ID and a secret key – copy these down for later.

Getting The Ball Rolling

When you first sign up with Amazon SES, your account is automatically placed in Sandbox mode. This means that you can only send emails to email addresses that you have verified with Amazon. You’ll need to open a request to move out of the Amazon SES Sandbox mode so that you can send emails to email addresses that you haven’t verified with Amazon. It can take up to a day or so for the request to be reviewed, so it’s best to get this started as soon as possible.

Make sure that you follow the guide and be as descriptive as possible in your request to make sure that the AWS team has everything they need to approve you. Once they approve your request, you’ll receive an email letting you know that they’ve increased your sending limits and moved your account out of sandbox mode.

Configuring WordPress to Send Emails Through SES

Now that your account is out of Sandbox mode, you’re ready to start sending emails through SES. There are two main ways to do this – you could configure your site to send the emails through SES via SMTP, or you could use the SES API and send the emails programmatically.

For best performance, Amazon recommends using the API. The reason for this is that while simpler to set up, SMTP is a more complicated connection which requires multiple requests to authenticate with the server. On the other hand, API calls can send over everything in one request, which is definitely beneficial when sending thousands of emails per day.

To help with setting up WordPress to send emails over the Amazon SES API, you can use our newly acquired WP SES plugin. While we’re working on releasing a new version with a revamped UI and improved feature set, this plugin still has everything you need to configure WordPress to send over SES:

WP SES plugin settings page

The “Sender Email” and “Sender Name” settings are pretty self-explanatory, and the values here are what the plugin will use when sending emails. The “Return Path” is used for email bounces and complaints.

For the “Reply To” field, you can enter an email address that should be used when clicking “Reply” to emails that are sent over SES. If your site receives a lot of contact form submissions and you want to be able to reply directly to the user when clicking “Reply” to their emails, you can set this field to “headers”. That way contact form plugins and other plugins can override the “Reply To” field on an individual basis.

Next enter your access keys that you received when creating an IAM user earlier. Once you save the settings, a confirmation email will be sent to the email address that you entered. Click the link in the confirmation email to validate your email address so that it can be used for sending.

Finally, click the “Turn ON” button at the top to start sending emails through SES. You can send a test email using the form at the bottom of the WP SES plugin to make sure that everything is working as intended.

Wrapping Up

That should be everything you need to get started with sending transactional emails from your website using Amazon SES. In this article we just covered the basics, but since you have full control of your Amazon account you might want to make some further tweaks. The Amazon SES documentation contains a wealth of information and it’s possible to set up some unique workflows that can scale for the largest of applications.

Do you use a transactional email service already? Would you be willing to give Amazon SES a try? Let us know in the comments.

Update: We’ve since launched WP Offload SES. Curious to check it out? Find it in the nav or visit this page to learn more.

About the Author

Matt Shaw

Matt is a WordPress plugin developer located near Philadelphia, PA. He loves to create awesome new tools with PHP, JavaScript, and whatever else he happens to get his hands on.