[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
Tue Sep 27 16:35:28 UTC 2011
#18792: Wrong FROM email when using wp_mail and built in mail() function
--------------------------+-----------------------------
Reporter: pigster | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Mail | Version: 3.2.1
Severity: normal | Keywords:
--------------------------+-----------------------------
When using wp_mail in combination with mail() function, then From:
envelope passed through -f parameter to sendmail is not set correctly.
Here is simple patch, that fixes the problem:
{{{
--- pluggable.php 2011-09-26 20:54:02.219330702 +0200
+++ pluggable.fixed.php 2011-09-27 18:19:21.283454810 +0200
@@ -394,8 +394,7 @@
}
// Plugin authors can override the potentially troublesome default
- $phpmailer->From = apply_filters( 'wp_mail_from' ,
$from_email );
- $phpmailer->FromName = apply_filters( 'wp_mail_from_name',
$from_name );
+ $phpmailer->SetFrom(apply_filters('wp_mail_from',
$from_email),apply_filters('wp_mail_from_name', $from_name));
// Set destination addresses
if ( !is_array( $to ) )
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/18792>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list