mirror of
https://github.com/wneessen/go-mail.git
synced 2024-12-22 10:40:39 +01:00
Sync with upstream
This PR syncs our smtp package with the upstream `net/smtp` changes introduced via bf91eb3a8b
This commit is contained in:
parent
85a99b3a4e
commit
071ad66035
2 changed files with 5 additions and 4 deletions
|
@ -210,7 +210,8 @@ func (c *Client) Auth(a Auth) error {
|
|||
}
|
||||
resp64 := make([]byte, encoding.EncodedLen(len(resp)))
|
||||
encoding.Encode(resp64, resp)
|
||||
code, msg64, err := c.cmd(0, strings.TrimSpace(fmt.Sprintf("AUTH %s %s", mech, resp64)))
|
||||
code, msg64, err := c.cmd(0, "%s", strings.TrimSpace(fmt.Sprintf("AUTH %s %s", mech,
|
||||
resp64)))
|
||||
for err == nil {
|
||||
var msg []byte
|
||||
switch code {
|
||||
|
@ -238,7 +239,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, string(resp64))
|
||||
code, msg64, err = c.cmd(0, "%s", resp64)
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
|
|
@ -1042,12 +1042,12 @@ func TestSendMail(t *testing.T) {
|
|||
|
||||
tc := textproto.NewConn(conn)
|
||||
for i := 0; i < len(data) && data[i] != ""; i++ {
|
||||
if err := tc.PrintfLine(data[i]); err != nil {
|
||||
if err := tc.PrintfLine("%s", data[i]); err != nil {
|
||||
t.Errorf("printing to textproto failed: %s", err)
|
||||
}
|
||||
for len(data[i]) >= 4 && data[i][3] == '-' {
|
||||
i++
|
||||
if err := tc.PrintfLine(data[i]); err != nil {
|
||||
if err := tc.PrintfLine("%s", data[i]); err != nil {
|
||||
t.Errorf("printing to textproto failed: %s", err)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue