Make the following test.
- Disable all of your SMTP plugins.
- Temporarily enable
WP_DEBUG
andWP_DEBUG_LOG
in your “wp-config.php” file. - Insert the following code in your theme “functions.php” file:
add_action( 'phpmailer_init', function ( $phpmailer ) {
$phpmailer->isSMTP();
$phpmailer->Port = 587;
$phpmailer->SMTPAuth = true;
$phpmailer->SMTPSecure="tls";
$phpmailer->FromName = get_bloginfo( 'name' );
// Type your SMTP credentials below.
$phpmailer->From = ''; // This is the email address that will be used as sender.
$phpmailer->Host="";
$phpmailer->Username="";
$phpmailer->Password = '';
// Temporarily enable while debugging.
$phpmailer->SMTPDebug = 1;
}, PHP_INT_MAX );
- Type your credentials in the snippet above and try to send an email. For example, try to reset your password.
- Did the message reach your inbox?
- If not, what’s inside the file “debug.log” (“…/wp-content/debug.log”)?