From 8655b3336068281d6a6c387f0898e8e48b441bcb 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: http://core.svn.wordpress.org/trunk@24530 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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;