Skip to content

Instantly share code, notes, and snippets.

@slaFFik
Last active October 6, 2023 07:11
  • Star 27 You must be signed in to star a gist
  • Fork 5 You must be signed in to fork a gist
Star You must be signed in to star a gist
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;
} );
@becahp
Copy link

becahp commented Jun 20, 2022

Thank you, it works! (using Wordpress 6.0 and WP Mail SMTP Version 3.2.1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment