Make WordPress Core

Changeset 52811

Timestamp:
02/28/2022 09:36:22 PM (2 years ago)
Author:
SergeyBiryukov
Message:

External Libraries: Upgrade PHPMailer to version 6.6.0.

This is a minor feature release.

Prior to this version, any OAuth provider needed to extend the provided OAuth base class, and this made it difficult to use with libraries other than ones based on the default league client packages. The OAuth property now accepts anything that implements the OAuthProviderInterface, making it much easier to use things like Google's own OAuth classes. Existing implementations that extend the provided OAuth base class will still work, as that base class now implements this interface too.

When TLS errors occurred in PHPMailer, the error messages were often missing important info that might help diagnose/solve the problem. These error messages should now be more informative. A minor change is that a TLS error on SMTP connect will now throw an exception if exceptions are enabled.

Release notes:
https://github.com/PHPMailer/PHPMailer/releases/tag/v6.6.0

For a full list of changes in this update, see the PHPMailer GitHub:
https://github.com/PHPMailer/PHPMailer/compare/v6.5.4...v6.6.0

Follow-up to [50628], [50799], [51169], [51634], [51635], [52252], [52749].

Props jrf, Synchro, miken32.
Fixes #55277.

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

Legend:

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

    r52749 r52811  
    359359
    360360    /**
    361      * An instance of the PHPMailer OAuth class.
    362      *
    363      * @var OAuth
     361     * An i.
     362     *
     363     * @var OAuth
    364364     */
    365365    protected $oauth;
     
    751751     * @var string
    752752     */
    753     const VERSION = '6.5.4';
     753    const VERSION = '6.';
    754754
    755755    /**
     
    21642164                    if ($tls) {
    21652165                        if (!$this->smtp->startTLS()) {
    2166                             throw new Exception($this->lang('connect_host'));
     2166                            $message = $this->getSmtpErrorMessage('connect_host');
     2167                            throw new Exception($message);
    21672168                        }
    21682169                        //We must resend EHLO after TLS negotiation
     
    21942195        if ($this->exceptions && null !== $lastexception) {
    21952196            throw $lastexception;
     2197
     2198
     2199
     2200
    21962201        }
    21972202
     
    41314136
    41324137    /**
     4138
     4139
     4140
     4141
     4142
     4143
     4144
     4145
     4146
     4147
     4148
     4149
     4150
     4151
     4152
     4153
     4154
     4155
     4156
     4157
    41334158     * Check if an error occurred.
    41344159     *
     
    50305055
    50315056    /**
    5032      * Get the OAuth instance.
    5033      *
    5034      * @return OAuth
     5057     * Get the OAuth instance.
     5058     *
     5059     * @return OAuth
    50355060     */
    50365061    public function getOAuth()
     
    50405065
    50415066    /**
    5042      * Set an OAuth instance.
    5043      */
    5044     public function setOAuth(OAuth $oauth)
     5067     * Set an OAuth instance.
     5068     */
     5069    public function setOAuth(OAuth $oauth)
    50455070    {
    50465071        $this->oauth = $oauth;
  • trunk/src/wp-includes/PHPMailer/SMTP.php

    r52749 r52811  
    3636     * @var string
    3737     */
    38     const VERSION = '6.5.4';
     38    const VERSION = '6.';
    3939
    4040    /**
     
    484484     * @param string $password The password
    485485     * @param string $authtype The auth type (CRAM-MD5, PLAIN, LOGIN, XOAUTH2)
    486      * @param OAuth  $OAuth    An optional OAuth instance for XOAUTH2 authentication
     486     * @param OAuth instance for XOAUTH2 authentication
    487487     *
    488488     * @return bool True if successfully authenticated
Note: See TracChangeset for help on using the changeset viewer.