[wp-trac] [WordPress Trac] #23291: wp_mail should handle phpmailer exceptions instead of ignoring them

WordPress Trac noreply at wordpress.org
Thu Jan 31 04:24:09 UTC 2013


#23291: wp_mail should handle phpmailer exceptions instead of ignoring them
-------------------------+------------------------------
 Reporter:  mark-k       |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Mail         |     Version:  3.5
 Severity:  minor        |  Resolution:
 Keywords:  has-patch    |
-------------------------+------------------------------

Comment (by iandunn):

 Replying to [comment:24 iandunn]:
 > I'll update the patch to do these things:
 >
 > 1. Return WP_Error even for non-fatal errors, like with the CC or
 attachment.
 >   a. If $return == 'wp_error', then it will return a WP_Error if any
 errors occur, and the calling function can decide what to do with them.
 >   b. If $return == 'bool', though, it will still return true for non-
 fatal errors and false only when $phpmailer->Send() fails.
 > 2. Change the WP_Error name prefix from "phpmailer" to just "mailer" so
 that it's more generic.
 > 3. Update retrieve_password() to display the detailed error message,
 rather than the generic one that's currently shown.
 >
 > I should have some time for that later this week.


 23291.2.diff is updated with those changes.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/23291#comment:25>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list