Go version

go1.22.4 darwin/arm64

Output of go env in your module/workspace:

GO111MODULE='on'
GOARCH='arm64'
GOBIN=''
GOCACHE='/Users/maksymbosik/Library/Caches/go-build'
GOENV='/Users/maksymbosik/Library/Application Support/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='arm64'
GOHOSTOS='darwin'
GOINSECURE=''
GOMODCACHE='/Users/maksymbosik/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='darwin'
GOPATH='/Users/maksymbosik/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/usr/local/go'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/usr/local/go/pkg/tool/darwin_arm64'
GOVCS=''
GOVERSION='go1.22.4'
GCCGO='gccgo'
AR='ar'
CC='clang'
CXX='clang++'
CGO_ENABLED='1'
GOMOD='/Users/maksymbosik/IdeaProjects/go-examples/go.mod'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/k8/1scngq9j4rz46np16jktyh5w0000gn/T/go-build1752497717=/tmp/go-build -gno-record-gcc-switches -fno-common'

What did you do?

func main() {
    address, err := mail.ParseAddress("foo@bar.com×")
    if err != nil {
        fmt.Printf("invalid %s", err)
    } else {
        fmt.Printf("valid %s", address.String())
    }
}

https://go.dev/play/p/OAhGOzjsQAa

What did you see happen?

Email contains U+00D7 https://en.wikipedia.org/wiki/Multiplication_sign -> it is not an x-× Actual output : valid foo@bar.com× It is unquoted character and not allowed special character.

What did you expect to see?

Expected output: err should return with invalid email

Comment From: gabyhelp

Related Issues

(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)

Comment From: seankhliao

net/mail specifies that it is RFC 5322 and extended by RFC 6532.

RFC 6532 section 3.2:

The preceding changes mean that the following constructs now allow UTF-8: ... 4. Domains.

Closing as working as intended.

Comment From: maksymbosik

Thank you for answer, oh there is extension to that RFC, sorry for bothering.