diff options
Diffstat (limited to 'src/net/smtp/smtp.go')
-rw-r--r-- | src/net/smtp/smtp.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/net/smtp/smtp.go b/src/net/smtp/smtp.go index e4e12ae5ee..1a6864a0f2 100644 --- a/src/net/smtp/smtp.go +++ b/src/net/smtp/smtp.go @@ -241,7 +241,8 @@ func (c *Client) Auth(a Auth) error { // Mail issues a MAIL command to the server using the provided email address. // If the server supports the 8BITMIME extension, Mail adds the BODY=8BITMIME -// parameter. +// parameter. If the server supports the SMTPUTF8 extension, Mail adds the +// SMTPUTF8 parameter. // This initiates a mail transaction and is followed by one or more Rcpt calls. func (c *Client) Mail(from string) error { if err := validateLine(from); err != nil { @@ -255,6 +256,9 @@ func (c *Client) Mail(from string) error { if _, ok := c.ext["8BITMIME"]; ok { cmdStr += " BODY=8BITMIME" } + if _, ok := c.ext["SMTPUTF8"]; ok { + cmdStr += " SMTPUTF8" + } } _, _, err := c.cmd(250, cmdStr, from) return err |