nette / mail

A handy library for creating and sending emails in PHP
https://doc.nette.org/mailing
Other
469 stars 71 forks source link

Message::formatEmail() #64

Closed WinterSilence closed 5 years ago

WinterSilence commented 5 years ago

Version: 3.3.0

Bug Description

formatEmail save name wrapped in quotes

https://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#'

WinterSilence commented 5 years ago

@dg 👍