wp_mail $from_name field is removing an extra character from the name
|Reported by:||hakanca||Owned by:|
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, '<' ));
Change History (14)
- Keywords reporter-feedback added
comment:4 SergeyBiryukov — 17 months ago
- Keywords 3.6-early added
- Milestone changed from Awaiting Review to Future Release
- Keywords 3.6-early removed
- Milestone changed from Future Release to 3.6
comment:9 in reply to: ↑ 7 ; follow-up: ↓ 10 DrewAPicture — 10 months ago
- Keywords dev-feedback added