From 21704cfdc005d44bb76bc068a035ffa6f4bc9924 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sat, 29 Jun 2013 23:03:13 +0000 Subject: [PATCH] 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 --- wp-includes/pluggable.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/wp-includes/pluggable.php b/wp-includes/pluggable.php index 76ebd21109..9e7ea94ac6 100644 --- a/wp-includes/pluggable.php +++ b/wp-includes/pluggable.php @@ -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;