Actually, sending mails works fine. But the error is annoying because it causes mu4e to keep the compose buffer open. Normally, it would close the buffer and save the mail to the sent folder. So I have to do it manually every time.
The complete message I get is:
message-send-mail-with-sendmail: Sending...failed to mail for [ -oi --read-envelope-from -t ] : send was successful;
I am sure that msmtp is working perfectly since there are no errors in the log and sending the exact same mail from the terminal returns a 0 exit code.
The sendmail part of the emacs config is:
(setq
sendmail-program (executable-find "msmtpq")
send-mail-function 'smtpmail-send-it
message-sendmail-f-is-evil t
message-sendmail-extra-arguments '("--read-envelope-from")
message-send-mail-function 'message-send-mail-with-sendmail
mml-secure-openpgp-sign-with-sender t
message-kill-buffer-on-exit t
)
Where does 'Sending...failed to' part of the message come from, and how can I debug it?
message-send-mail-with-sendmail
. If you doC-h f message-send-mail-with-sendmail
, it says it's a function inmessage.el
. The filenamemessage.el
is a link, so you can click on it to get to the Lisp code of the function. You can see that the function issues that error message. What I can't see is why themail for [ -oi --read-envelope-from -t ] : send was successful;
ended up in the error buffer, making the function think that something went awry.call-process-region
and added to the error buffer.