Closed josephmturner closed 1 year ago
Hi Joseph,
this is some issue with the bui library that I faced before, but have not clue what is causing it. Regarding mail sending, can you let me know a few things that will help me debug:
async-email-sending-send-mail-async
to see whether this succeeds sending the email?send-mail-function
message-send-mail-function
mu4e--main-queue-size
and smtpmail-send-queued-mail
is thereBest,
Boris
I tried M-: (async-email-sending-send-mail-async)
from within the draft buffer. This has the same effect as attempting to send the mail normally after enabling async-email-sending
with customize: the email is not sent, and list-processes
displays a new child *emacs*
process. Inspecting the child process reveals
Lisp expression: Warning (defvaralias): Overwriting value of `epg-bug-report-address' by aliasing to `report-emacs-bug-address'
Outgoing SMTP mail server:
The values of send-mail-function
and message-send-mail-function
are both async-email-sending-send-mail-async
.
I'm not sure the best way to check that the advice is set correctly. What I did was instrument async-email-sending-advice-add-if-def
for Edebug before enabling async-email-sending
with customize. The following advices are set:
(advice-add mu4e--main-queue-size :override async-email-sending--num-queued-emails)
(advice-add smtpmail-send-queued-mail :override async-email-sending--flush-queued-emails)
So the good news is that the async code was actually executed. I suspect the issue is related to epa trying to access your credentials and as there is no user interaction with the emacs process that async spawns, it will fail to do so. I remember reading something about authentification problems with the https://github.com/jwiegley/emacs-async/blob/master/smtpmail-async.el package. I have to find that comment again and see what can be done about this.
Looks like I was wrong. Emacs is trying to ask you for an smtp server in smtpmail-via-smtp
to send from interactively and gets stuck. From smtpmail.el
:
(unless smtpmail-smtp-server
(smtpmail-query-smtp-server))
and gets stuck here as we can see based on the output of the process you posted:
(defun smtpmail-query-smtp-server ()
"Query for an SMTP server and try to contact it.
If the contact succeeds, customizes and saves `smtpmail-smtp-server'
and `smtpmail-smtp-service'. This tries standard SMTP ports, and if
none works asks you to supply one. If you know that you need to use
a non-standard port, you can set `smtpmail-smtp-service' in advance.
Returns an error if the server cannot be contacted."
(let ((server (read-string "Outgoing SMTP mail server: "))
I've pushed an update that should fix the bui interface and that makes sure that smtpmail-smtp-server
is set before the async call. Hopefully that will fix things.
My (obvious) problem is that my sendmail-program
is "msmtp"
. After converting my set-up to smtpmail
and re-testing, I'll let you know if the problem goes away.
I spent a few hours in vain today trying to set up smtpmail with multiple maildirs. I've resolved to stick with msmtp for now. Sorry I can't be of more help to you! I hope to see this project succeed!
Hi Boris! This looks great! I hope this gets integrated into mu4e/gnus at some point.
I ran into a crash after installing
async-email-sending
manually from src and performing the following actions:(require 'async-email-sending)
(didn't enableasync-email-sending
yet)async-email-sending
withcustomize-variable
I am on Emacs 29 with mu4e.
Hope this is useful!
Joseph