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

Closed
horkhe opened this issue Apr 5, 2017 · 6 comments
Closed

net/smtp: Add support for SMTPUTF8 extension (rfc6531) #19860

horkhe opened this issue Apr 5, 2017 · 6 comments

Comments

@horkhe
Copy link

horkhe 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
Copy link
Contributor

bradfitz 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
@dcormier
Copy link
Contributor

dcormier commented Aug 6, 2020

Given that other proposals for net/smtp are now being considered (at least #40034), perhaps this is worth another look? I've forked net/smtp to be able to have this functionality, but I'd really rather not maintain that.

@ianlancetaylor
Copy link
Contributor

How big is the change?

@dcormier
Copy link
Contributor

dcormier commented Aug 6, 2020

Very small.

@ianlancetaylor
Copy link
Contributor

Sure, send it, we can take a look. Thanks.

@gopherbot
Copy link

Change https://golang.org/cl/247257 mentions this issue: net/smtp: adds support for the SMTPUTF8 extenstion

decke added a commit to decke/smtprelay that referenced this issue Feb 25, 2021
@golang golang locked and limited conversation to collaborators Sep 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants