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

WordPress Trac noreply at wordpress.org
Sat Jan 26 21:44:18 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 mark-k):

 set_error_handler is just not very easy to use. It is probably not very
 known and you have to filter the errors to find the ones you are
 interested in.

 Actually not sure if triggering an error is good enough because many
 places suppress errors when calling wp_mail, and places which don't, might
 suddenly display unexpected errors.

 Seems to me that returning WP_Error is the only real solution here,
 anything else will just be an hack around it. The only place in core which
 cares right now about the return value can be changed to expect either
 false or WP_Error so it still will be compatible with plugins which
 override wp_mail, and we are early enough in 3.6 cycle to let authors of
 plugins that use wp_mail know about the change and prepare for it.

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


More information about the wp-trac mailing list