Open golddranks opened 7 years ago
Your example doesn't have <> but I assume you meant
Pyry Kontio <pyry.kontio@drasa.eu>
Even with the <>, that isn't a syntactically valid From field; the Display Name needs to be quoted if it contains whitespace.
See Originator fields and Address specification.
FromStr parses the whole string into the address field. But if I have a from field like "Pyry Kontio pyry.kontio@drasa.eu", I'd expect it parse the first part into the name field and the part inside the <> into the address field.
If it seems hard to break current functionality, Mailbox would should at least provide another method for attempting to parse this. This surprising behaviour breaks some downstream crates too – I came here because I got noticed this behaviour on Lettre.