Closed WinterSilence closed 5 years ago
Version: 3.3.0
formatEmail save name wrapped in quotes
formatEmail
https://github.com/nette/mail/blob/4c1a77099fdb1849c05d2432f0ffed6faf25b08c/src/Mail/Message.php#L144
$message->formatEmail('"Winter Silence" <info@site.com>'); add address ['name' => '"Winter Silence"', 'email' => 'info@site.com']
$message->formatEmail('"Winter Silence" <info@site.com>');
['name' => '"Winter Silence"', 'email' => 'info@site.com']
fix regexp: '#^"?(.+)"?\s+<(.*)>\z#'
'#^"?(.+)"?\s+<(.*)>\z#'
@dg 👍
Version: 3.3.0
Bug Description
formatEmail
save name wrapped in quoteshttps://github.com/nette/mail/blob/4c1a77099fdb1849c05d2432f0ffed6faf25b08c/src/Mail/Message.php#L144
Steps To Reproduce
$message->formatEmail('"Winter Silence" <info@site.com>');
add address['name' => '"Winter Silence"', 'email' => 'info@site.com']
Possible Solution
fix regexp:
'#^"?(.+)"?\s+<(.*)>\z#'