External Libraries: Upgrade PHPMailer to version 6.6.3.
This is a maintenance release with minor CS improvements. Release notes: https://github.com/PHPMailer/PHPMailer/releases/tag/v6.6.3 For a full list of changes in this update, see the PHPMailer GitHub: https://github.com/PHPMailer/PHPMailer/compare/v6.6.2...v6.6.3 Follow-up to [50628], [50799], [51169], [51634], [51635], [52252], [52749], [52811], [53500]. Props jrf, Synchro. Fixes #56016. Built from https://develop.svn.wordpress.org/trunk@53535 git-svn-id: http://core.svn.wordpress.org/trunk@53124 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
cb93e6ba63
commit
75f689766f
|
@ -750,7 +750,7 @@ class PHPMailer
|
|||
*
|
||||
* @var string
|
||||
*/
|
||||
const VERSION = '6.6.2';
|
||||
const VERSION = '6.6.3';
|
||||
|
||||
/**
|
||||
* Error severity: message only, continue processing.
|
||||
|
@ -1557,17 +1557,17 @@ class PHPMailer
|
|||
|
||||
//Validate From, Sender, and ConfirmReadingTo addresses
|
||||
foreach (['From', 'Sender', 'ConfirmReadingTo'] as $address_kind) {
|
||||
$this->$address_kind = trim($this->$address_kind);
|
||||
if (empty($this->$address_kind)) {
|
||||
$this->{$address_kind} = trim($this->{$address_kind});
|
||||
if (empty($this->{$address_kind})) {
|
||||
continue;
|
||||
}
|
||||
$this->$address_kind = $this->punyencodeAddress($this->$address_kind);
|
||||
if (!static::validateAddress($this->$address_kind)) {
|
||||
$this->{$address_kind} = $this->punyencodeAddress($this->{$address_kind});
|
||||
if (!static::validateAddress($this->{$address_kind})) {
|
||||
$error_message = sprintf(
|
||||
'%s (%s): %s',
|
||||
$this->lang('invalid_address'),
|
||||
$address_kind,
|
||||
$this->$address_kind
|
||||
$this->{$address_kind}
|
||||
);
|
||||
$this->setError($error_message);
|
||||
$this->edebug($error_message);
|
||||
|
@ -1667,7 +1667,7 @@ class PHPMailer
|
|||
default:
|
||||
$sendMethod = $this->Mailer . 'Send';
|
||||
if (method_exists($this, $sendMethod)) {
|
||||
return $this->$sendMethod($this->MIMEHeader, $this->MIMEBody);
|
||||
return $this->{$sendMethod}($this->MIMEHeader, $this->MIMEBody);
|
||||
}
|
||||
|
||||
return $this->mailSend($this->MIMEHeader, $this->MIMEBody);
|
||||
|
@ -2202,7 +2202,8 @@ class PHPMailer
|
|||
//As we've caught all exceptions, just report whatever the last one was
|
||||
if ($this->exceptions && null !== $lastexception) {
|
||||
throw $lastexception;
|
||||
} elseif ($this->exceptions) {
|
||||
}
|
||||
if ($this->exceptions) {
|
||||
// no exception was thrown, likely $this->smtp->connect() failed
|
||||
$message = $this->getSmtpErrorMessage('connect_host');
|
||||
throw new Exception($message);
|
||||
|
@ -3715,20 +3716,21 @@ class PHPMailer
|
|||
* These differ from 'regular' attachments in that they are intended to be
|
||||
* displayed inline with the message, not just attached for download.
|
||||
* This is used in HTML messages that embed the images
|
||||
* the HTML refers to using the $cid value.
|
||||
* the HTML refers to using the `$cid` value in `img` tags, for example `<img src="cid:mylogo">`.
|
||||
* Never use a user-supplied path to a file!
|
||||
*
|
||||
* @param string $path Path to the attachment
|
||||
* @param string $cid Content ID of the attachment; Use this to reference
|
||||
* the content when using an embedded image in HTML
|
||||
* @param string $name Overrides the attachment name
|
||||
* @param string $encoding File encoding (see $Encoding)
|
||||
* @param string $type File MIME type
|
||||
* @param string $disposition Disposition to use
|
||||
*
|
||||
* @throws Exception
|
||||
* @param string $name Overrides the attachment filename
|
||||
* @param string $encoding File encoding (see $Encoding) defaults to `base64`
|
||||
* @param string $type File MIME type (by default mapped from the `$path` filename's extension)
|
||||
* @param string $disposition Disposition to use: `inline` (default) or `attachment`
|
||||
* (unlikely you want this – {@see `addAttachment()`} instead)
|
||||
*
|
||||
* @return bool True on successfully adding an attachment
|
||||
* @throws Exception
|
||||
*
|
||||
*/
|
||||
public function addEmbeddedImage(
|
||||
$path,
|
||||
|
@ -4106,12 +4108,8 @@ class PHPMailer
|
|||
//Is it a valid IPv4 address?
|
||||
return filter_var($host, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4) !== false;
|
||||
}
|
||||
if (filter_var('http://' . $host, FILTER_VALIDATE_URL) !== false) {
|
||||
//Is it a syntactically valid hostname?
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
//Is it a syntactically valid hostname (when embeded in a URL)?
|
||||
return filter_var('http://' . $host, FILTER_VALIDATE_URL) !== false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -4581,7 +4579,7 @@ class PHPMailer
|
|||
public function set($name, $value = '')
|
||||
{
|
||||
if (property_exists($this, $name)) {
|
||||
$this->$name = $value;
|
||||
$this->{$name} = $value;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ class SMTP
|
|||
*
|
||||
* @var string
|
||||
*/
|
||||
const VERSION = '6.6.2';
|
||||
const VERSION = '6.6.3';
|
||||
|
||||
/**
|
||||
* SMTP line break constant.
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.1-alpha-53534';
|
||||
$wp_version = '6.1-alpha-53535';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue