[wp-trac] [WordPress Trac] #19847: wp_mail $from_name field is removing an extra character from the name

WordPress Trac wp-trac at lists.automattic.com
Tue Jan 17 05:13:19 UTC 2012


#19847: wp_mail $from_name field is removing an extra character from the name
--------------------------+-----------------------------
 Reporter:  hakanca       |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  3.3.1
 Severity:  normal        |   Keywords:  has-patch
--------------------------+-----------------------------
 If the headers are sent as a string to wp_mail, parsing of $from_name
 field removes one required character at the end of the name. Hence causing
 a name field of "Hakan" to show up as "Haka" in the received email.

 Line 257 of pluggable.php is causing this error.

 $from_name = substr( $content, 0, strpos( $content, '<' ) - 1 );

 Removing "-1" from substr function call solves the problem.

 $from_name = substr( $content, 0, strpos( $content, '<' ));

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/19847>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list