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

git-svn-id: https://develop.svn.wordpress.org/trunk@24530 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2013-06-29 23:03:13 +00:00
parent b7591bb34e
commit 21704cfdc0
1 changed files with 1 additions and 3 deletions

View File

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