diff options
Diffstat (limited to 'libgo/go/net/smtp/smtp.go')
-rw-r--r-- | libgo/go/net/smtp/smtp.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libgo/go/net/smtp/smtp.go b/libgo/go/net/smtp/smtp.go index 9e04dd7c82b..a408fa53363 100644 --- a/libgo/go/net/smtp/smtp.go +++ b/libgo/go/net/smtp/smtp.go @@ -9,7 +9,7 @@ // STARTTLS RFC 3207 // Additional extensions may be handled by clients. // -// The smtp package is frozen and not accepting new features. +// The smtp package is frozen and is not accepting new features. // Some external packages provide more functionality. See: // // https://godoc.org/?q=smtp @@ -19,6 +19,7 @@ import ( "crypto/tls" "encoding/base64" "errors" + "fmt" "io" "net" "net/textproto" @@ -200,7 +201,7 @@ func (c *Client) Auth(a Auth) error { } resp64 := make([]byte, encoding.EncodedLen(len(resp))) encoding.Encode(resp64, resp) - code, msg64, err := c.cmd(0, "AUTH %s %s", mech, resp64) + code, msg64, err := c.cmd(0, strings.TrimSpace(fmt.Sprintf("AUTH %s %s", mech, resp64))) for err == nil { var msg []byte switch code { |