[wp-trac] [WordPress Trac] #18792: Wrong FROM email when using wp_mail and built in mail() function

WordPress Trac wp-trac at lists.automattic.com
Wed Apr 18 19:47:11 UTC 2012


#18792: Wrong FROM email when using wp_mail and built in mail() function
--------------------------------+------------------------------
 Reporter:  pigster             |       Owner:  westi
     Type:  defect (bug)        |      Status:  accepted
 Priority:  normal              |   Milestone:  Awaiting Review
Component:  External Libraries  |     Version:  3.2.1
 Severity:  normal              |  Resolution:
 Keywords:  has-patch           |
--------------------------------+------------------------------
Changes (by KevinHamilton):

 * keywords:   => has-patch


Comment:

 If sending emails in a loop with a different From address for each, the
 above patch results in the envelope for all being set to the same as the
 first.  Need to also reset the Sender property, as in the following patch:


 {{{
 ===================================================================
 --- pluggable.php       (revision 41797)
 +++ pluggable.php       (working copy)
 @@ -370,6 +370,7 @@
         $phpmailer->ClearCCs();
         $phpmailer->ClearCustomHeaders();
         $phpmailer->ClearReplyTos();
 +       $phpmailer->Sender='';

         // From email and name
         // If we don't have a name from the input headers

 }}}

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


More information about the wp-trac mailing list