Last active
December 25, 2015 19:09
-
-
Save mattheu/7025636 to your computer and use it in GitHub Desktop.
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
<?php | |
/** | |
* Plugin Name: PHPMailer SMTP Settings | |
* Description: Enables SMTP servers, SSL/TSL authentication and SMTP settings. | |
*/ | |
defined( 'ABSPATH' ) OR exit; | |
add_action( 'phpmailer_init', 'my_phpmailer_init' ); | |
function my_phpmailer_init( PHPMailer $phpmailer ) { | |
$phpmailer->Host = 'smtp.mandrillapp.com'; | |
$phpmailer->Port = 587; | |
$phpmailer->Username = ''; | |
$phpmailer->From = ''; | |
$phpmailer->Password = ''; | |
$phpmailer->SMTPAuth = true; | |
// $phpmailer->SMTPSecure = 'ssl'; // enable if required, 'tls' is another possible value | |
// if ( defined( 'HM_DEV' ) && HM_DEV ) { | |
// $phpmailer->ClearAllRecipients(); | |
// $phpmailer->AddAddress( '[email protected]' ); | |
// } | |
$phpmailer->IsSMTP(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment