Skip to content

Instantly share code, notes, and snippets.

@karrikas
Created January 11, 2017 14:37
Show Gist options
  • Select an option

  • Save karrikas/96fe0aedc05ba73ed160854392717451 to your computer and use it in GitHub Desktop.

Select an option

Save karrikas/96fe0aedc05ba73ed160854392717451 to your computer and use it in GitHub Desktop.
Phpmailer wordpress, disable SSL certificate check [allow_self_signed]
<?php
add_action( 'phpmailer_init', 'phpmailer_disable_self_signed' );
function phpmailer_disable_self_signed( PHPMailer $phpmailer ) {
$phpmailer->SMTPOptions = ['ssl'=> ['allow_self_signed' => true]];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment