Created
August 17, 2016 19:26
-
-
Save iandunn/58453917f91ebb53bdb5152c98662fba to your computer and use it in GitHub Desktop.
Disable PHPMailer sending via SMTP, so that MailCatcher can catch outbound messages from dev environments
This file contains 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
/** | |
* Configure PHPMailer to send via PHP's mail() | |
* | |
* @param PHPMailer $phpmailer | |
*/ | |
function phpmailer_send_via_mail( $phpmailer ) { | |
$phpmailer->IsMail(); | |
} | |
add_action( 'phpmailer_init', 'phpmailer_send_via_mail', 999 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment