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/smtp: Add support for SMTPUTF8 extension (rfc6531) #19860

Open
horkhe opened this issue Apr 5, 2017 · 1 comment

Comments

Projects
None yet
2 participants
@horkhe
Copy link

commented Apr 5, 2017

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

@bradfitz

This comment has been minimized.

Copy link
Member

commented Apr 5, 2017

See the package doc for net/smtp which says:

The smtp package is frozen and is not accepting new features. Some external packages provide more functionality. See:

https://godoc.org/?q=smtp

Have you verified there isn't a better smtp client implementation elsewhere?

Maybe you can own one?

@bradfitz bradfitz added this to the Unplanned milestone Apr 5, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.