This commit is contained in:
Marcus Bointon 2021-08-18 10:37:43 +02:00
parent 99937ed637
commit 5d7f077daa
No known key found for this signature in database
GPG Key ID: DE31CD6EB646AA24
1 changed files with 3 additions and 4 deletions

View File

@ -1194,13 +1194,12 @@ class PHPMailer
if ($useimap && function_exists('imap_rfc822_parse_adrlist')) {
//Use this built-in parser if it's available
$list = imap_rfc822_parse_adrlist($addrstr, '');
// Clear any potential IMAP errors to get rid of notices begin thrown at end of script.
// Clear any potential IMAP errors to get rid of notices being thrown at end of script.
imap_errors();
foreach ($list as $address) {
if (
('.SYNTAX-ERROR.' !== $address->host) && static::validateAddress(
$address->mailbox . '@' . $address->host
)
'.SYNTAX-ERROR.' !== $address->host &&
static::validateAddress($address->mailbox . '@' . $address->host)
) {
//Decode the name part if it's present and encoded
if (