Make wp_mail() return the actual result of PHPMailer::Send() instead of always returning true. props chmac. fixes #23642.

git-svn-id: http://core.svn.wordpress.org/trunk@24530 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2013-06-29 23:03:13 +00:00
parent 2bf327f3b2
commit 8655b33360

View File

@ -448,12 +448,10 @@ function wp_mail( $to, $subject, $message, $headers = '', $attachments = array()
// Send!
try {
$phpmailer->Send();
return $phpmailer->Send();
} catch ( phpmailerException $e ) {
return false;
}
return true;
}
endif;