Make WordPress Core


Ignore:
Timestamp:
08/11/2025 04:16:19 PM (5 months ago)
Author:
SergeyBiryukov
Message:

External Libraries: Upgrade PHPMailer to version 6.10.0.

This is a feature and maintenance release introducing full support for RFC 6531 SMTPUTF8, meaning that plugin or theme developers are now free to use Unicode characters in email addresses, such as JøeÜser@example.com, without any complicated encoding schemes. Using this feature requires sending through a mail server that advertises support for SMTPUTF8. For full details see SMTPUTF8.md.

This commit also includes the parts of PHPMailer not previously bundled with core, specifically the DSNConfigurator, OAuth, and POP3 classes, so that plugin developers could use those extended features without including their own versions of the library.

Including the full library aims to make it easier (and faster) for core to update in case of security issues, and to provide more flexibility and security for plugins and (by extension) users of WordPress.

References:

Follow-up to [54937], [55557], [56484], [57137], [59246], [59481].

Props agulbra, Ipstenu, JeffMatson, lukecavanagh, dd32, Otto42, JeffMatson, MattyRob, desrosj, SirLouen, SergeyBiryukov.
Fixes #39714, #63811.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/PHPMailer/SMTP.php

    r59481 r60623  
    3636     * @var string
    3737     */
    38     const VERSION = '6.9.3';
     38    const VERSION = '6.10.0';
    3939
    4040    /**
     
    159159     */
    160160    public $do_verp = false;
     161
     162    /**
     163     * Whether to use SMTPUTF8.
     164     *
     165     * @see https://www.rfc-editor.org/rfc/rfc6531
     166     *
     167     * @var bool
     168     */
     169    public $do_smtputf8 = false;
    161170
    162171    /**
     
    914923     * the mail transaction is started and then one or more recipient
    915924     * commands may be called followed by a data command.
    916      * Implements RFC 821: MAIL <SP> FROM:<reverse-path> <CRLF>.
     925     * Implements RFC 821: MAIL <SP> FROM:<reverse-path> <CRLF> and
     926     * two extensions, namely XVERP and SMTPUTF8.
     927     *
     928     * The server's EHLO response is not checked. If use of either
     929     * extensions is enabled even though the server does not support
     930     * that, mail submission will fail.
     931     *
     932     * XVERP is documented at https://www.postfix.org/VERP_README.html
     933     * and SMTPUTF8 is specified in RFC 6531.
    917934     *
    918935     * @param string $from Source address of this message
     
    923940    {
    924941        $useVerp = ($this->do_verp ? ' XVERP' : '');
     942        $useSmtputf8 = ($this->do_smtputf8 ? ' SMTPUTF8' : '');
    925943
    926944        return $this->sendCommand(
    927945            'MAIL FROM',
    928             'MAIL FROM:<' . $from . '>' . $useVerp,
     946            'MAIL FROM:<' . $from . '>' . $useSmtputf8 . $useVerp,
    929947            250
    930948        );
     
    13661384
    13671385    /**
     1386     * Enable or disable use of SMTPUTF8.
     1387     *
     1388     * @param bool $enabled
     1389     */
     1390    public function setSMTPUTF8($enabled = false)
     1391    {
     1392        $this->do_smtputf8 = $enabled;
     1393    }
     1394
     1395    /**
     1396     * Get SMTPUTF8 use.
     1397     *
     1398     * @return bool
     1399     */
     1400    public function getSMTPUTF8()
     1401    {
     1402        return $this->do_smtputf8;
     1403    }
     1404
     1405    /**
    13681406     * Set error messages and codes.
    13691407     *
Note: See TracChangeset for help on using the changeset viewer.