Parse email with header "From" in parentheses format
Emails header "From" can be not only in angles format, like this:
From: John Doe <email@example.com>
but also in parentheses format, like this:
From: firstname.lastname@example.org (John Doe)
For example sendmail from postfix does this when using switch -F.
The patch to fix this is attached.
- Category set to Email receiving
- Subject changed from Parse email with header "From" in parens format to Parse email with header "From" in parentheses format
- Description updated (diff)
- Target version set to Candidate for next major release
I wrote a new patch. The code using
Mail::Address is shorter and maybe more reliable (I hope) than the code using our regular expressions.
Patches to commit:
- Target version changed from 4.0.2 to 4.1.0
- File 17699-fix-using-mail-address-object-v2.diff added
Updated the patch.
email.header['from'] can be nil or
Mail::UnstructuredField object (does not have
- File deleted (
Updated the patch again.
from_addr.comments also can be nil.
Also available in: Atom