External Libraries: Upgrade PHPMailer to version 6.6.4.

This is a maintenance release with minor changes:

* Add `text/csv` MIME type.
* Fix DKIM when sending to anonymous group via `mail()`.

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

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

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

Props jrf, Synchro.
Fixes #56016.
Built from https://develop.svn.wordpress.org/trunk@53917


git-svn-id: http://core.svn.wordpress.org/trunk@53476 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2022-08-22 12:26:12 +00:00
parent 9f48903eec
commit eb822d7fef
3 changed files with 16 additions and 8 deletions

View File

@ -350,8 +350,8 @@ class PHPMailer
public $Password = '';
/**
* SMTP auth type.
* Options are CRAM-MD5, LOGIN, PLAIN, XOAUTH2, attempted in that order if not specified.
* SMTP authentication type. Options are CRAM-MD5, LOGIN, PLAIN, XOAUTH2.
* If not specified, the first one from that list that the server supports will be selected.
*
* @var string
*/
@ -750,7 +750,7 @@ class PHPMailer
*
* @var string
*/
const VERSION = '6.6.3';
const VERSION = '6.6.4';
/**
* Error severity: message only, continue processing.
@ -1096,7 +1096,7 @@ class PHPMailer
return false;
}
if ($name !== null) {
if ($name !== null && is_string($name)) {
$name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim
} else {
$name = '';
@ -1288,7 +1288,7 @@ class PHPMailer
*/
public function setFrom($address, $name = '', $auto = true)
{
$address = trim($address);
$address = trim((string)$address);
$name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim
//Don't validate now addresses with IDN. Will be done in send().
$pos = strrpos($address, '@');
@ -1893,7 +1893,14 @@ class PHPMailer
foreach ($this->to as $toaddr) {
$toArr[] = $this->addrFormat($toaddr);
}
$to = implode(', ', $toArr);
$to = trim(implode(', ', $toArr));
//If there are no To-addresses (e.g. when sending only to BCC-addresses)
//the following should be added to get a correct DKIM-signature.
//Compare with $this->preSend()
if ($to === '') {
$to = 'undisclosed-recipients:;';
}
$params = null;
//This sets the SMTP envelope sender which gets turned into a return-path header by the receiver
@ -4472,6 +4479,7 @@ class PHPMailer
'ics' => 'text/calendar',
'xml' => 'text/xml',
'xsl' => 'text/xml',
'csv' => 'text/csv',
'wmv' => 'video/x-ms-wmv',
'mpeg' => 'video/mpeg',
'mpe' => 'video/mpeg',

View File

@ -35,7 +35,7 @@ class SMTP
*
* @var string
*/
const VERSION = '6.6.3';
const VERSION = '6.6.4';
/**
* SMTP line break constant.

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.1-alpha-53916';
$wp_version = '6.1-alpha-53917';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.