[wp-trac] [WordPress Trac] #23642: wp_mail() returns true if sending failed

WordPress Trac noreply at wordpress.org
Thu Feb 28 15:54:39 UTC 2013


#23642: wp_mail() returns true if sending failed
-----------------------------+--------------------------
 Reporter:  chmac            |       Type:  defect (bug)
   Status:  new              |   Priority:  normal
Milestone:  Awaiting Review  |  Component:  Mail
  Version:  trunk            |   Severity:  minor
 Keywords:  has-patch        |
-----------------------------+--------------------------
 Here: source:/trunk/wp-includes/pluggable.php at 23507#L449

 The code is:
 {{{
         try {
                 $phpmailer->Send();
         } catch ( phpmailerException $e ) {
                 return false;
         }

                 return true;
 }}}
 However, $phpmailer->Send() may return false without throwing an
 exception. A simple change fixes this like so:
 {{{
         try {
                 return $phpmailer->Send();
         } catch ( phpmailerException $e ) {
                 return false;
         }
 }}}

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/23642>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list