-
Notifications
You must be signed in to change notification settings - Fork 8
Description
When I send a message immediately and don't have an internet connection, I see this message in the mini-buffer:
smtp.domain.tld/25 nodename nor servname provided, or not known
The message remains open in the Emacs frame with some changes such as the FCC header with the destination filepath and is saved to Drafts.
When I delay sending mail with mu4e-send-delay, at the time of sending, the mini-buffer shows Sending via mail.... If I have no internet connection at the time of sending, a pop-up appears in Emacs:
Emacs-x86_64-10_14
Buffer *temp* modified; kill anyway?
[Yes] [No]
If I click Yes, the mini-buffer changes to Buffer *temp* modified; kill anyway? y. If I click No, the mini-buffer changes to Buffer *temp* modified; kill anyway? n and I get a file similar to *message*-20190627-105554 saved in the home directory with the content of the message:
User-agent: mu4e 1.2.0; emacs 26.2
From: ...
To: ...
Subject: ...
Fcc: /path/to/maildir/Sent Items/cur/1561629089.e6e765d7b4ad6364.hostname:2,S
Date: Thu, 27 Jun 2019 11:01:54 +0100
Message-ID: <[email protected]>
--text follows this line--
...
Annoyingly, I get a new saved message with the same content every time I click No in the Emacs pop-up.
I fiddled with the code and I get this upon exit
Save file /path/to/maildir/Drafts/cur/some-id.hostname:2,DS? (y, n !, ...)
Playing with the code, the issue is in function mu4e-send-delay-send-if-due, which calls (message-send-mail). The help for this last function shows:
message-send-mail is a compiled Lisp function in ‘message.el’.
and its source code modifies the buffer and then calls kill-buffer without options for confirmation.
(defun message-send-mail (&optional _)
...
(kill-buffer tembuf))
...
)
So I can either remove the confirmation default before calling it, and then putting it back, which is ugly, or I can check for an internet connection before trying to send. I will propose a pull request with this fix.