Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
WP Mail SMTP: when using SMTP mailer - disable SSL verify on PHP 5.6+
<?php
add_filter('wp_mail_smtp_custom_options', function( $phpmailer ) {
$phpmailer->SMTPOptions = array(
'ssl' => array(
'verify_peer' => false,
'verify_peer_name' => false,
'allow_self_signed' => true
)
);
return $phpmailer;
} );
@myselfhimself

This comment has been minimized.

Copy link

myselfhimself commented Jan 30, 2018

Thank you for pasting! To be used with this plugin: https://wordpress.org/plugins/wp-mail-smtp/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.