diff --git a/smtp/auth_cram_md5_118.go b/smtp/auth_cram_md5_118.go index c9ff86f..71233f2 100644 --- a/smtp/auth_cram_md5_118.go +++ b/smtp/auth_cram_md5_118.go @@ -39,6 +39,8 @@ func (a *cramMD5Auth) Start(_ *ServerInfo) (string, []byte, error) { return "CRAM-MD5", nil, nil } +// Backport of: https://github.com/golang/go/commit/58158e990f272774e615c9abd8662bf0198c29aa#diff-772fc9f5d0c86f26e35158fb3e7a71a4967d18b4ec23a5dbb60781ab0babf426 +// to guarantee backwards compatiblity with Go 1.16-1.18 func (a *cramMD5Auth) Next(fromServer []byte, more bool) ([]byte, error) { if more { d := hmac.New(md5.New, []byte(a.secret)) diff --git a/smtp/smtp_ehlo_117.go b/smtp/smtp_ehlo_117.go index 6e52858..a77d937 100644 --- a/smtp/smtp_ehlo_117.go +++ b/smtp/smtp_ehlo_117.go @@ -20,6 +20,9 @@ import "strings" // ehlo sends the EHLO (extended hello) greeting to the server. It // should be the preferred greeting for servers that support it. +// +// Backport of: https://github.com/golang/go/commit/4d8db00641cc9ff4f44de7df9b8c4f4a4f9416ee#diff-4f6f6bdb9891d4dd271f9f31430420a2e44018fe4ee539576faf458bebb3cee4 +// to guarantee backwards compatiblity with Go 1.16/1.17:w func (c *Client) ehlo() error { _, msg, err := c.cmd(250, "EHLO %s", c.localName) if err != nil {