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
I tried to parse a mail address formatted like Software @ Server <noreply@example.com>, but I got the error mail: missing '@' or angle-addr. I assume this is a bug since I can't find the RFC5322 mentioning anywhere that an '@' is not allowed in the name, and also because this works with other software I have used in the past (but they might have implemented RFC5322 incorrectly...).
Here is the code that fails:
package main
import (
"fmt""log""net/mail"
)
funcmain() {
e, err:=mail.ParseAddress("Software @ Server <noreply@example.com>")
iferr!=nil {
log.Fatal(err)
}
fmt.Println(e.Name)
fmt.Println(e.Address)
}
What did you see happen?
The following was printed out when I ran the program above:
2024/03/21 17:49:14 mail: missing '@' or angle-addr
exit status 1
What did you expect to see?
Something like:
Software @ Server
noreply@example.com
The text was updated successfully, but these errors were encountered:
Go version
go version go1.22.1 linux/amd64
Output of
go env
in your module/workspace:What did you do?
I tried to parse a mail address formatted like
Software @ Server <noreply@example.com>
, but I got the errormail: missing '@' or angle-addr
. I assume this is a bug since I can't find the RFC5322 mentioning anywhere that an '@' is not allowed in the name, and also because this works with other software I have used in the past (but they might have implemented RFC5322 incorrectly...).Here is the code that fails:
What did you see happen?
The following was printed out when I ran the program above:
What did you expect to see?
Something like:
The text was updated successfully, but these errors were encountered: