[wp-trac] [WordPress Trac] #21659: wp_mail() problem with Reply-To header

WordPress Trac noreply at wordpress.org
Wed Mar 12 00:30:53 UTC 2014


#21659: wp_mail() problem with Reply-To header
--------------------------+------------------------------
 Reporter:  pavelevap     |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Mail          |     Version:  3.4.1
 Severity:  normal        |  Resolution:
 Keywords:  close         |     Focuses:
--------------------------+------------------------------
Changes (by bpetty):

 * keywords:   => close


Comment:

 So... I'm just going to suggest a close as invalid since it is possible to
 still make this work in 3rd party code. Here's one kind of weird way to do
 it anyway, but this is assuming you don't want to plug in you're own
 custom `wp_mail()` function:

 {{{

 $my_plugin_replyto_address = 'foo at example.org';
 $my_plugin_replyto_name = 'Lukáš LastName';

 add_action('phpmailer_init', 'my_plugin_add_reply_to');
 function my_plugin_add_reply_to( $phpmailer ) {
         global $my_plugin_replyto_address, $my_plugin_replyto_name;
         $phpmailer->addReplyTo($my_plugin_replyto_address,
 $my_plugin_replyto_name);
 }

 wp_mail(...);
 }}}

 If someone wants to expand core `wp_mail()` to detect 'Reply-To' headers,
 and automatically do this itself, that might be nice, but it seems like
 this isn't so much a "bug" as it is intentional behavior.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/21659#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list