Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
net/mail: ParseAddress: unclear error message #21018
When parsing this address:
mail.ParseAddress("Foo (middle) Bar <firstname.lastname@example.org>")
you get the following error:
That's confusing because an angle-addr is present in the input.
The email address should be formatted with quotes as:
mail.ParseAddress(`"Foo (middle) Bar" <email@example.com>`)
But we could probably be clearer about the error there.
Errors seems quite easy to fix. I would like to give it a try, but before, does somebody want to comment on the format.
Should we show how it should be, such as:
or just drop a more precise message about error:
Calling parseAddres for:
so I made a change that calling for: