Forked from slaFFik/wpms-smtp-disable-ssl-verify.php
Created
October 15, 2021 20:24
-
-
Save liamstewart23/e768f325d8f55e0814cd799bfc6b8ca7 to your computer and use it in GitHub Desktop.
WP Mail SMTP: when using SMTP mailer - disable SSL verify on PHP 5.6+
This file contains hidden or 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
| <?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; | |
| } ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment