diff --git a/commands/compose/send.go b/commands/compose/send.go index f61478f..849182d 100644 --- a/commands/compose/send.go +++ b/commands/compose/send.go @@ -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()