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:
parent
b7591bb34e
commit
21704cfdc0
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue