Should I use SMTP to send email from WordPress?
On my WordPress websites I’ve used Mandrill to send all emails in place of the default way that WordPress sends emails. WordPress by default uses the host server to send emails (such as submitted contact forms) which proves very unreliable. One could use SMTP with your default email account credentials (by default I mean Google Apps, Microsoft Office 365, Yahoo Mail etc.) however this becomes a real maintenance problem should you change your password. Using a transactional email provider makes sending email from your website extremely reliable and free of issues.
Which transactional email provider should I use with WordPress?
Fortunately there are many very good transactional email services that work well with WordPress. SendGrid, MailGun, Postmark and various others come to mind however when it comes to value for money and reputation it takes alot to beat AWS Amazon SES.
I’ve used AWS services for many years (especially EC2 virtual servers, S3 storage, CloudFront CDN and Route 53 DNS hosting) and have found them very cost effective and reliable. Being a Mailchimp Expert and delivering Mailchimp training, my first choice was to use Mandrill however, now that Mandrill is no longer cost effective for my needs, it’s Amazon SES for my transactional sending needs.
How to setup Amazon SES in WordPress
Setting up Amazon SES to send all your WordPress email is simple enough. Just follow the instructions below.
Setup Amazon SES
The most difficult part of the process is setting up Amazon SES. This however really isn’t all that complicated.
- Login to the AWS Console (if you don’t have an AWS account then you’ll need to create one).
- Click SES (under Application Services).
- Click Identity Management.
- To the left of your screen click Domains then the Verify a New Domain button. Follow the instructions to verify your domain.
- To the left of your screen click Email Addresses then the Verify a New Email Address button. Follow the instructions to verify your email address.
- Click SMTP settings. Make a note of the server name and the various port numbers.
- Still in SMTP settings, click Create my SMTP Credentials and, once the SMTP credentials have been created, make a note of the username and password.
You’ll notice above that Amazon SES requires that you enter SMTP details to send with Amazon SES (as opposed to API credentials that some other transactional email providers prefer you use). Using the SES SMTP details works well as you likely won’t need to change your password in the future.
Note: Please be aware that by default SES will only send to email addresses that you’ve verified per step 5 above.
Setup WordPress to send with SES
We’re now ready to move onto the WordPress part of the setup. Follow the steps below.
- Login to your WordPress dashboard.
- Install and activate the WP Mail SMTP plugin (any good similar plugin will do the trick but the instructions below use this plugin).
- Go to Settings -> Ex SMTP Mail Setting.
- Enter your name in the From Name field.
- Under Mailer ensure that Send all WordPress emails via SMTP is selected.
- In the SMTP Options section:
- SMTP Host: Enter the Server Name provided by Amazon SES.
- SMTP Port: Enter 587 (if during testing you encounter errors then try port 25 or 465. The error EOF caught while checking if connected is a good indication that the port number needs changing.
- Encryption: Select Use TLS encryption.
- Authentication: Select Yes: Use SMTP authentication.
- Username: Enter your SES provided username.
- Password: Enter your SES provided password.
- Click Save Changes.
- Send yourself a test email.
If you don’t receive the test email then check your email spam/junk folder. If the test email isn’t there then change the port number per item 6.2 above.
Great article. I’m in the same boat with many small clients using mailchimp and mandrill. $30/month minimum was not an option for most. Setup was super easy. Thank for posting this.
Glad it helped Cody.
Thanks this was a brilliant help. Now just going to connect this with Mautic.
Thanks. Sending the test email works but I’m still not able to receive an email sent through my WPForms Lite contact form.
Since I know my email configuration works (because I received the test email) I’m not sure what’s going on. Note that both the test email and the contact form were being sent to the same email address which has been validated with SES.
Any ideas?
Very very Helpful, thank you for posting this. Connecting this to Mautic… do you have more info about this… Once again thank you.
Hey Gary, great post. I’m based in London and I’m using AWS for hosting. Am I right that AWS do not provide SES for my region? Can you recommend another provider? Thanks
Hi Kate, You’re correct; AWS SES have receiving and sending endpoints at US East (N. Virginia), US West (Oregon) and EU (Ireland). If you’re in London then the Ireland endpoint should suffice (unless there are e.g. privacy reasons why you need the endpoint in England or the U.k.
There are other good transactional sending services such as Mailgun however I’m not sure if they have endpoints in the U.k./England.
Thanks for your help Gary, understood!
This is great and all, but how do you send email to someone other than yourself? SMTP keeps telling me that this Email address is not verified when I try to send email to someone other than that which is listed in Amazon SES Server. What’s the point of changing WordPress to use SMTP Email with Amazon SES when the only person you can send email to is yourself?
I think it’s because you need to take Amazon SES out of sandbox mode, which you can do from the Sending Statistics page. Basically you have to submit a support request to increase your limit and be upgraded from sandbox mode.
hi, thanks for sharing valuable insights about amaon ses, im using wp pluin mymail , do you how to setup amaon ses setting inside the plugin interface