WordPress.org

Make WordPress Core


Ignore:
Timestamp:
07/13/16 18:03:52 (10 months ago)
Author:
boonebgorges
Message:

Mail: Improve handling of UTF-8 address headers.

Previously, wp_mail() implemented Reply-To as a generic header, using
PHPMailer's addCustomHeader(). As such, the email address portion of
the header was being incorrectly encoded when the name portion
contained UTF-8 characters. Switching to PHPMailer's more specific
addReplyTo() method fixes the issue.

For greater readability, the handling of all address-related headers
(To, CC, BCC, Reply-To) has been standardized.

Props szepe.viktor, iandunn, bpetty, stephenharris.
Fixes #21659.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/includes/mock-mailer.php

    r37358 r38058  
    1818            'cc'      => $this->cc, 
    1919            'bcc'     => $this->bcc, 
    20             'header'  => $this->MIMEHeader, 
     20            'header'  => $this->MIMEHeader . $this->mailHeader, 
    2121            'subject' => $this->Subject, 
    2222            'body'    => $this->MIMEBody, 
Note: See TracChangeset for help on using the changeset viewer.