Skip to content

Instantly share code, notes, and snippets.

@QROkes
Created May 10, 2017 01:37
Show Gist options
  • Save QROkes/e36c6cb7a6df38f318a998e3479643f1 to your computer and use it in GitHub Desktop.
Save QROkes/e36c6cb7a6df38f318a998e3479643f1 to your computer and use it in GitHub Desktop.
How to use Amazon SES in WordPress.
// Amazon SES (AWS) instead php mail.
add_action( 'phpmailer_init', 'qr_aws_ses_smtp' );
function qr_aws_ses_smtp( $phpmailer ) {
$phpmailer->isSMTP();
$phpmailer->Host = 'email-smtp.us-east-1.amazonaws.com';
$phpmailer->SMTPAuth = true;
$phpmailer->Port = 25;
$phpmailer->Username = 'AWS SES Credentials - username';
$phpmailer->Password = 'AWS SES Credentials - password';
$phpmailer->SMTPSecure = 'tls';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment