about summary refs log tree commit diff stats
path: root/commands/compose
diff options
context:
space:
mode:
authorReto Brunner <reto@labrat.space>2021-02-28 02:04:58 +0100
committerReto Brunner <reto@labrat.space>2021-02-28 02:05:12 +0100
commit8cd2485170e97867321fac2f26ba876f377d5d8e (patch)
treec6299dd5378364ae51666d2587e7e681e7d1f2f6 /commands/compose
parent8b4f2d148c8519326f306fd14ba872d7cb3101c6 (diff)
downloadaerc-8cd2485170e97867321fac2f26ba876f377d5d8e.tar.gz
send: fix missing error return
Diffstat (limited to 'commands/compose')
-rw-r--r--commands/compose/send.go4
1 files changed, 4 insertions, 0 deletions
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()