~sircmpwn/aerc

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
1

[PATCH] propagate error from sendmail

Details
Message ID
<20200914183059.266744-1-joost@joo.st>
DKIM signature
pass
Download raw message
Patch: +8 -1
---
Currently whenever the sendmail command fails, aerc has no idea and will
happily say everything is fine and copy the email to the SENT folder.
This patch adds proper error propagation and shows an error in the ui
that something has gone wrong with the send.

 commands/compose/send.go | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/commands/compose/send.go b/commands/compose/send.go
index dd7ece9..1e0a3ce 100644
--- a/commands/compose/send.go
+++ b/commands/compose/send.go
@@ -232,9 +232,16 @@ func (Send) Execute(aerc *widgets.Aerc, args []string) error {
			return 0, errors.Wrap(err, "cmd.StdinPipe")
		}
		defer wc.Close()
		go cmd.Run()
		err = cmd.Start()
		if err != nil {
			return 0, errors.Wrap(err, "cmd.Start")
		}
		ctr := datacounter.NewWriterCounter(wc)
		composer.WriteMessage(header, ctr)
		err = cmd.Wait()
		if err != nil {
			return 0, errors.Wrap(err, "cmd.Wait")
		}
		return int(ctr.Count()), nil
	}

-- 
2.28.0
Details
Message ID
<C5NX6IMB80WU.H5BAT7J0YUHG@arch>
In-Reply-To
<20200914183059.266744-1-joost@joo.st> (view parent)
DKIM signature
pass
Download raw message
This sadly breaks sending, will send an updated patch.
Review patch Export thread (mbox)