Make WordPress Core

Changeset 57137

Timestamp:
11/26/2023 07:25:50 PM (8 months ago)
Author:
SergeyBiryukov
Message:

External Libraries: Upgrade PHPMailer to version 6.9.1.

This is a maintenance and feature release, adding support for the official release of PHP 8.3, methods for removing and replacing custom headers, XCLIENT support, and links to a new way of implementing XOAUTH2 authentication.

The only change likely to have any impact on existing code is that PHPMailer previously attempted to use opportunistic STARTTLS encryption when connecting to localhost, which was unlikely to work. The workaround required setting SMTPAutoTLS = false, but that's no longer required. You may still need to use this setting when connecting to literal IPs.

References:

Follow-up to [50628], [50799], [51169], [51634], [51635], [52252], [52749], [52811], [53500], [53535], [53917], [54427], [54937], [55557], [56484].

Props jrf, Synchro.
Fixes #59966.

Location:
trunk/src/wp-includes/PHPMailer
Files:
2 edited

Legend:

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

    r56484 r57137  
    359359
    360360    /**
     361
     362
     363
     364
     365
     366
     367
    361368     * An implementation of the PHPMailer OAuthTokenProvider interface.
    362369     *
     
    751758     * @var string
    752759     */
    753     const VERSION = '6.8.1';
     760    const VERSION = '6..1';
    754761
    755762    /**
     
    15741581            //Validate From, Sender, and ConfirmReadingTo addresses
    15751582            foreach (['From', 'Sender', 'ConfirmReadingTo'] as $address_kind) {
     1583
     1584
     1585
     1586
    15761587                $this->{$address_kind} = trim($this->{$address_kind});
    15771588                if (empty($this->{$address_kind})) {
     
    20012012
    20022013    /**
     2014
     2015
     2016
     2017
     2018
     2019
     2020
     2021
     2022
     2023
     2024
     2025
     2026
     2027
     2028
     2029
     2030
     2031
     2032
     2033
     2034
     2035
     2036
     2037
     2038
     2039
     2040
     2041
     2042
     2043
     2044
     2045
    20032046     * Send mail via SMTP.
    20042047     * Returns false if there is a bad MAIL FROM, RCPT, or DATA input.
     
    20272070        } else {
    20282071            $smtp_from = $this->Sender;
     2072
     2073
     2074
    20292075        }
    20302076        if (!$this->smtp->mail($smtp_from)) {
     
    21902236                    //Automatically enable TLS encryption if:
    21912237                    //* it's not disabled
     2238
    21922239                    //* we have openssl extension
    21932240                    //* we are not already using SSL
    21942241                    //* the server offers STARTTLS
    2195                     if ($this->SMTPAutoTLS && $sslext && 'ssl' !== $secure && $this->smtp->getServerExt('STARTTLS')) {
     2242                    if (
     2243                        $this->SMTPAutoTLS &&
     2244                        $this->Host !== 'localhost' &&
     2245                        $sslext &&
     2246                        $secure !== 'ssl' &&
     2247                        $this->smtp->getServerExt('STARTTLS')
     2248                    ) {
    21962249                        $tls = true;
    21972250                    }
     
    40514104
    40524105    /**
     4106
     4107
     4108
     4109
     4110
     4111
     4112
     4113
     4114
     4115
     4116
     4117
     4118
     4119
     4120
     4121
     4122
     4123
     4124
     4125
     4126
     4127
     4128
     4129
     4130
     4131
     4132
     4133
     4134
     4135
     4136
     4137
     4138
     4139
     4140
     4141
     4142
     4143
     4144
     4145
     4146
     4147
     4148
     4149
     4150
     4151
     4152
     4153
     4154
     4155
     4156
     4157
     4158
     4159
     4160
     4161
     4162
     4163
     4164
     4165
     4166
     4167
     4168
     4169
     4170
     4171
     4172
     4173
     4174
     4175
     4176
     4177
     4178
    40534179     * Add an error message to the error container.
    40544180     *
  • trunk/src/wp-includes/PHPMailer/SMTP.php

    r56484 r57137  
    3636     * @var string
    3737     */
    38     const VERSION = '6.8.1';
     38    const VERSION = '6..1';
    3939
    4040    /**
     
    197197        'ZoneMTA' => '/[\d]{3} Message queued as (.*)/',
    198198        'Mailjet' => '/[\d]{3} OK queued as (.*)/',
     199
     200
     201
     202
     203
     204
     205
     206
     207
     208
     209
     210
    199211    ];
    200212
     
    973985
    974986    /**
     987
     988
     989
     990
     991
     992
     993
     994
     995
     996
     997
     998
     999
     1000
     1001
     1002
     1003
     1004
     1005
    9751006     * Send an SMTP RSET command.
    9761007     * Abort any transaction that is currently in progress.
Note: See TracChangeset for help on using the changeset viewer.