send: fix missing error return
This commit is contained in:
parent
8b4f2d148c
commit
8cd2485170
1 changed files with 4 additions and 0 deletions
|
@ -320,6 +320,10 @@ func newSmtpSender(ctx sendCtx) (io.WriteCloser, error) {
|
|||
return nil, fmt.Errorf("not an smtp protocol %s", ctx.scheme)
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "Connection failed")
|
||||
}
|
||||
|
||||
saslclient, err := newSaslClient(ctx.auth, ctx.uri)
|
||||
if err != nil {
|
||||
conn.Close()
|
||||
|
|
Loading…
Reference in a new issue