-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Description
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (go version
)?
go version go1.7.5 darwin/amd64
What operating system and processor architecture are you using (go env
)?
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/maxim/workspace/goworld"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/vr/lfwfw4nn5pz_w5203lt5_8140000gn/T/go-build690204281=/tmp/go-build -gno-record-gcc-switches -fno-common"
CXX="clang++"
CGO_ENABLED="1"
What did you do?
Try sending an email to an address that contains UTF-8 characters.
What did you expect to see?
An email should be successfully delivered.
What did you see instead?
Delivery fails. The exact SMTP status code and message depend on the target server. E.g. gmail returns: 555 5.5.2 Syntax error. u200si18377193qka.138 - gsmtp
Even though gmail SMTP server advertise SMTPUTF8 in their EHLO response:
250-mx.google.com at your service, [157.130.196.214]
250-SIZE 157286400
250-8BITMIME
250-STARTTLS
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-CHUNKING
250 SMTPUTF8
It expects to see SMTPUTF8 parameter in MAIL command, as per rfc6531:
One OPTIONAL parameter, SMTPUTF8, is added to the MAIL command.
The parameter does not accept a value. If this parameter is set
in the MAIL command, it indicates that the SMTP client is
SMTPUTF8-aware. Its presence also asserts that the envelope
includes the non-ASCII address, the message being sent is an
internationalized message, or the message being sent needs the
SMTPUTF8 support