diff options
-rw-r--r-- | commands/compose/send.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/commands/compose/send.go b/commands/compose/send.go index f61478f1..849182d5 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() |