From 8cd2485170e97867321fac2f26ba876f377d5d8e Mon Sep 17 00:00:00 2001 From: Reto Brunner Date: Sun, 28 Feb 2021 02:04:58 +0100 Subject: send: fix missing error return --- commands/compose/send.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'commands/compose/send.go') 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() -- cgit