You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mail.ParseAddress choked on five adresses. Two times it was legitimate; but three of them failed to parse just because they contain round parentheses in the name part.
Here is a minimal example:
package main
import (
"fmt"
"log"
"net/mail"
)
func main() {
s := "Hyang-Ah (Hana) Kim <hyangah@gmail.com>"
a, err := mail.ParseAddress(s)
if err != nil {
log.Fatal(err)
}
fmt.Println(a)
}
I expected to see
"Hyang-Ah (Hana) Kim" <hyangah@gmail.com>
but instead i see
2016/08/14 21:28:50 mail: no angle-addr
Even if name aren’t allowed to contain round parentheses, the error message is confusing, because there clearly are square/angle bracket with an email adress between.
The text was updated successfully, but these errors were encountered:
I'm using
I tried to parse all email adresses from the
git log
output of https://github.com/golang/go.mail.ParseAddress
choked on five adresses. Two times it was legitimate; but three of them failed to parse just because they contain round parentheses in the name part.Here is a minimal example:
I expected to see
but instead i see
Even if name aren’t allowed to contain round parentheses, the error message is confusing, because there clearly are square/angle bracket with an email adress between.
The text was updated successfully, but these errors were encountered: