Default CharSet to UTF-8 if we are using UTF-8 addresses and the validator has not been changed.
This commit is contained in:
parent
29a04c283a
commit
ddebeb0565
|
|
@ -1173,10 +1173,10 @@ class PHPMailer
|
||||||
protected function addAnAddress($kind, $address, $name = '')
|
protected function addAnAddress($kind, $address, $name = '')
|
||||||
{
|
{
|
||||||
if (
|
if (
|
||||||
$this->CharSet === self::CHARSET_UTF8 &&
|
|
||||||
self::$validator === 'php' &&
|
self::$validator === 'php' &&
|
||||||
$this->addressHasUnicodeLocalPart($address)
|
$this->addressHasUnicodeLocalPart($address)
|
||||||
) {
|
) {
|
||||||
|
$this->CharSet = self::CHARSET_UTF8;
|
||||||
self::$validator = 'eai';
|
self::$validator = 'eai';
|
||||||
}
|
}
|
||||||
if (!in_array($kind, ['to', 'cc', 'bcc', 'Reply-To'])) {
|
if (!in_array($kind, ['to', 'cc', 'bcc', 'Reply-To'])) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue