Created
October 28, 2019 09:13
-
-
Save eksiscloud/9f3f60dc346d8328fd0ca5b6846c8daa to your computer and use it in GitHub Desktop.
Wordpress: Use Amazon SES with PHPMailer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'phpmailer_init', 'set_phpmailer_details' ); | |
function set_phpmailer_details( $phpmailer ) { | |
$phpmailer->isSMTP(); | |
$phpmailer->Host = 'SMTP_endpoint'; //Amazon SES SMTP endpoint for your region | |
$phpmailer->SMTPAuth = true; | |
$phpmailer->Port = 587; | |
$phpmailer->Username = 'Amazon_SES_USERNAME'; | |
$phpmailer->Password = 'Amazon_SES_PASSWORD'; | |
$phpmailer->SMTPSecure = 'tls'; | |
$phpmailer->From = get_option('admin_email'); //your verified email address | |
$phpmailer->FromName = "Your Name"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add in functions.php of (child)theme or use Snippets plugin.