Skip to content

Instantly share code, notes, and snippets.

@emzo
Created June 14, 2016 21:59
Show Gist options
  • Save emzo/ba94837c804616546d9a7365ad4a1ebf to your computer and use it in GitHub Desktop.
Save emzo/ba94837c804616546d9a7365ad4a1ebf to your computer and use it in GitHub Desktop.
Alow SSL conections to sites with self-signed or problematic certificates
<?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
)
);
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment