Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

net/mail: mail.ParseAddress() doesn't handle parantheses #7831

gopherbot opened this issue Apr 22, 2014 · 3 comments

net/mail: mail.ParseAddress() doesn't handle parantheses #7831

gopherbot opened this issue Apr 22, 2014 · 3 comments


Copy link

@gopherbot gopherbot commented Apr 22, 2014

by Artagnon:

The following program errors out:

  addr, err := mail.ParseAddress("=?utf-8?q?btrahan_(Bob_Trahan)?= <>")
  if err != nil {


  mail: no angle-addr

Although the given address is valid.
Copy link

@bradfitz bradfitz commented Apr 22, 2014

Comment 1:

Labels changed: added release-go1.3maybe, repo-main.

Owner changed to @dsymonds.

Copy link

@dsymonds dsymonds commented Apr 22, 2014

Comment 2:

That address is not valid according to RFC 5322. Those parens should have been escaped.
You could make the case that net/mail should still parse it, but you'd need to back that
up with some idea of how common that spec violation is.

Labels changed: added release-none, removed release-go1.3maybe.

Status changed to WorkingAsIntended.

Copy link

@gopherbot gopherbot commented Jul 23, 2014

Comment 3 by

how should we handle this kind of email ? Obviously there are a lot of such broken
emails (i.e. from 1400 emails I've found 20 into my inbox )
@golang golang locked and limited conversation to collaborators Jun 25, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.