开发者 | bashaus |
---|---|
更新时间 | 2018年1月4日 04:59 |
PHP版本: | 3.0.1 及以上 |
WordPress版本: | 4.9.1 |
版权: | MIT |
版权网址: | 版权信息 |
wp-config.php
file to include the required constants:
/*
* Include your AWS keys.
*
* A safe approach is to store your key and secret in environment
* variables. This way, your credentials are not hard coded in version
* control.
/
define( 'WP_MAIL_SES_ACCESS_KEY_ID', getenv( 'WP_MAIL_SES_ACCESS_KEY_ID' ) );
define( 'WP_MAIL_SES_SECRET_ACCESS_KEY', getenv( 'WP_MAIL_SES_SECRET_ACCESS_KEY' ) );
/*
* Define the endpoint for your emails to be sent. Endpoints include:
*
* email.us-east-1.amazonaws.com
* email.us-west-2.amazonaws.com
* email.eu-west-1.amazonaws.com
/
define( 'WP_MAIL_SES_ENDPOINT', 'email.eu-west-1.amazonaws.com' );
Optional extra configuration:
/*
* Define the composer information for your email (who the email is
* sent from). The email address must be approved in your AWS console
* in the specified region.
*
* This email address is used if a composer is not already defined by
* the email.
/
define( 'WP_MAIL_SES_COMPOSER_NAME', 'Company Name' );
define( 'WP_MAIL_SES_COMPOSER_EMAIL', 'confirmed@example.com' );
/*
* Disable accessing of statistics from the Dashboard.
* This can help if you're hitting the API too frequently.
/
define( 'WP_MAIL_SES_HIDE_STATISTICS', true );
3. Install plugin
Copy this folder wp-mail-ses
to your /wp-content/plugins/
directory.
4. Activate plugin
Go to your WordPress Administration and activate the WP Mail SES
plugin.
5. Send a test message
Go to: Admin
» Settings
» WP Mail SES
There are a number of reasons that an email might not be sent via SES, here is a quick checklist to ensure that the plugin has been setup properly: Have you:
WP_MAIL_SES_ACCESS_KEY_ID
, WP_MAIL_SES_SECRET_ACCESS_KEY
and
WP_MAIL_SES_ENDPOINT
in wp-config.php
?WP_MAIL_SES_COMPOSER_EMAIL
in wp-config.php
with your
verified email address?In order to send emails to the public, you need to move out of the Amazon SES Sandbox and into the production account. Read the documentation on Amazon.
You can post your question on GitHub.