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

WordPress Trac noreply at wordpress.org
Tue Aug 16 18:16:58 UTC 2022


#19847: wp_mail $from_name field is removing an extra character from the name
---------------------------------------------------+----------------------
 Reporter:  hakanca                                |       Owner:  desrosj
     Type:  defect (bug)                           |      Status:  closed
 Priority:  normal                                 |   Milestone:  6.1
Component:  Mail                                   |     Version:  3.3
 Severity:  normal                                 |  Resolution:  fixed
 Keywords:  has-patch dev-feedback has-unit-tests  |     Focuses:
---------------------------------------------------+----------------------
Changes (by desrosj):

 * owner:  (none) => desrosj
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"53900" 53900]:
 {{{
 #!CommitTicketReference repository="" revision="53900"
 Mail: Prevent the last character of names in  “From” headers from being
 trimmed.

 When extracting the email and name from a “From” header, the last
 character of the name is incorrectly trimmed when a space is not included
 between the name and the opening `<`.

 Though the space is required for the header to be compliant with RFC5322
 (see https://www.rfc-editor.org/rfc/rfc5322#section-3.4), the absence of a
 space can be ignored here. PHPMailer accepts the name and email as
 separate parameters and constructs the header correctly later on.

 Props hakanca, mikehansenme, SergeyBiryukov, kovshenin, mattyrob,
 drewapicture, desrosj.
 Fixes #19847.
 }}}

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


More information about the wp-trac mailing list