wp-includes/PHPMailer/PHPMailer.php:1300Parse a string containing one or more RFC822-style comma-separated email addresses with the form "display name <address>" into an array of name/address pairs.
$addrstrstring$charsetstringarray protected static function parseSimplerAddresses($addrstr, $charset) { // Emit a runtime notice to recommend using the IMAP extension for full RFC822 parsing trigger_error(self::lang('imap_recommended'), E_USER_NOTICE); $addresses = []; $list = explode(',', $addrstr); foreach ($list as $address) { $address = trim($address); //Is there a separate name part? if (strpos($address, '<') === false) { //No separate name, just use the whole thing if (static::validateAddress($address)) { $addresses[] = [ 'name' => '', 'address' => $address, ]; } } else { $parsed = static::parseEmailString($address); $email = $parsed['email']; if (static::validateAddress($email)) { $name = static::decodeHeader($parsed['name'], $charset); $addresses[] = [ //Remove any surrounding quotes and spaces from the name 'name' => trim($name, '\'" '), 'address' => $email, ]; } } } return $addresses; }Unchanged from 6.9.7 through 7.1.0.
Signature, return type and hooks compared across 3 parsed releases.
src/wp-includes/PHPMailer/PHPMailer.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.