mirror of
https://github.com/wneessen/go-mail.git
synced 2024-11-23 22:20:51 +01:00
Compare commits
No commits in common. "661b7dace21cd300f2f266680e3c57dfca44ca70" and "85a99b3a4e34300f82bf3edcaf672744bfa976e9" have entirely different histories.
661b7dace2
...
85a99b3a4e
2 changed files with 4 additions and 5 deletions
|
@ -210,8 +210,7 @@ func (c *Client) Auth(a Auth) error {
|
||||||
}
|
}
|
||||||
resp64 := make([]byte, encoding.EncodedLen(len(resp)))
|
resp64 := make([]byte, encoding.EncodedLen(len(resp)))
|
||||||
encoding.Encode(resp64, resp)
|
encoding.Encode(resp64, resp)
|
||||||
code, msg64, err := c.cmd(0, "%s", strings.TrimSpace(fmt.Sprintf("AUTH %s %s", mech,
|
code, msg64, err := c.cmd(0, strings.TrimSpace(fmt.Sprintf("AUTH %s %s", mech, resp64)))
|
||||||
resp64)))
|
|
||||||
for err == nil {
|
for err == nil {
|
||||||
var msg []byte
|
var msg []byte
|
||||||
switch code {
|
switch code {
|
||||||
|
@ -239,7 +238,7 @@ func (c *Client) Auth(a Auth) error {
|
||||||
}
|
}
|
||||||
resp64 = make([]byte, encoding.EncodedLen(len(resp)))
|
resp64 = make([]byte, encoding.EncodedLen(len(resp)))
|
||||||
encoding.Encode(resp64, resp)
|
encoding.Encode(resp64, resp)
|
||||||
code, msg64, err = c.cmd(0, "%s", resp64)
|
code, msg64, err = c.cmd(0, string(resp64))
|
||||||
}
|
}
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
|
@ -1042,12 +1042,12 @@ func TestSendMail(t *testing.T) {
|
||||||
|
|
||||||
tc := textproto.NewConn(conn)
|
tc := textproto.NewConn(conn)
|
||||||
for i := 0; i < len(data) && data[i] != ""; i++ {
|
for i := 0; i < len(data) && data[i] != ""; i++ {
|
||||||
if err := tc.PrintfLine("%s", data[i]); err != nil {
|
if err := tc.PrintfLine(data[i]); err != nil {
|
||||||
t.Errorf("printing to textproto failed: %s", err)
|
t.Errorf("printing to textproto failed: %s", err)
|
||||||
}
|
}
|
||||||
for len(data[i]) >= 4 && data[i][3] == '-' {
|
for len(data[i]) >= 4 && data[i][3] == '-' {
|
||||||
i++
|
i++
|
||||||
if err := tc.PrintfLine("%s", data[i]); err != nil {
|
if err := tc.PrintfLine(data[i]); err != nil {
|
||||||
t.Errorf("printing to textproto failed: %s", err)
|
t.Errorf("printing to textproto failed: %s", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue