https://github.com/humanmade/aws-ses-wp-mail
An AWS SES wp_mail() drop-in
https://github.com/humanmade/aws-ses-wp-mail
Last synced: about 1 year ago
JSON representation
An AWS SES wp_mail() drop-in
- Host: GitHub
- URL: https://github.com/humanmade/aws-ses-wp-mail
- Owner: humanmade
- Created: 2015-12-15T18:25:08.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2025-03-11T18:42:37.000Z (over 1 year ago)
- Last Synced: 2025-05-15T06:03:26.415Z (about 1 year ago)
- Language: PHP
- Size: 1.58 MB
- Stars: 185
- Watchers: 36
- Forks: 52
- Open Issues: 18
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
AWS SES wp_mail() drop-in
Use AWS SES to send your WordPress emails. Easily.
A Human Made project. Maintained by @joehoyle.
AWS SES is a very simple UI-less plugin for sending `wp_mail()`s email via AWS SES.
Getting Set Up
==========
Once you have `git clone`d the repo, or added it as a Git Submodule, add the following constants to your `wp-config.php`:
```PHP
define( 'AWS_SES_WP_MAIL_REGION', 'us-east-1' );
define( 'AWS_SES_WP_MAIL_KEY', '' );
define( 'AWS_SES_WP_MAIL_SECRET', '' );
define( 'AWS_SES_WP_MAIL_CONFIG_SET', '' );
```
If you plan to use IAM instance profiles to protect your AWS credentials on disk you'll need the following configuration instead:
```PHP
define('AWS_SES_WP_MAIL_REGION', 'us-east-1');
define('AWS_SES_WP_MAIL_USE_INSTANCE_PROFILE', true);
```
The next thing that you should do is to verify your sending domain for SES. You can do this via the AWS Console, which will allow you to automatically set headers if your DNS is hosted on Route 53. Alternatively, you can get the required DNS records by running:
```
wp aws-ses verify-sending-domain
```
Once you have verified your sending domain, you are all good to go!
**Note:** If you have not used SES in production previously, you need to apply to [move out of the Amazon SES sandbox](http://docs.aws.amazon.com/ses/latest/DeveloperGuide/request-production-access.html).
### Configuration Sets
To better track your mail activity for monitoring or statistics you can use the configuration sets. To enable it you will first need to create your Configuration Set on AWS SES Console and add the configuration set name as the value to the `AWS_SES_WP_MAIL_CONFIG_SET` constant.
Detailed information on the setup and usage you find here: https://docs.aws.amazon.com/ses/latest/DeveloperGuide/using-configuration-sets.html
Other Commands
=======
`wp aws-ses send [--from-email=]`
Send a test email via the command line. Good for testing!
Credits
=======
Created by Human Made for high volume and large-scale sites. We run AWS SES wp_mail() on sites with millions of monthly page views, and thousands of sites.
Written and maintained by [Joe Hoyle](https://github.com/joehoyle). Thanks to all our [contributors](https://github.com/humanmade/S3-Uploads/graphs/contributors).
Interested in joining in on the fun? [Join us, and become human!](https://hmn.md/is/hiring/)