djcb / mu

maildir indexer/searcher + emacs mail client + guile bindings
http://www.djcbsoftware.nl/code/mu
GNU General Public License v3.0
1.59k stars 384 forks source link

[mu4e bug] Unable to send message with empty body #2692

Closed jgoerzen closed 2 months ago

jgoerzen commented 2 months ago

Describe the bug

I often send myself quick reminders - I just fill in my own address in To, add a subject, and send.

Since 1.12, if I hit C-c C-c (message-send-and-exit) without adding a body, the buffer gets corrupted and I am asked if I want to "Fix continuation lines".

For instance, the buffer looks like this first:

To: jgoerzen@REDACTED
Subject: Test
From: John Goerzen <jgoerzen@REDACTED>
Date: Sun, 14 Apr 2024 08:37:11 -0500
Message-ID: <87zftwhxq0.fsf@REDACTED>
--text follows this line--

Now I hit C-c C-c, and the minibuffer asks "Fix continuation lines?"

And the buffer now looks like this:

From: John Goerzen <jgoerzen@REDACTED>
To: jgoerzen@REDACTED
Subject: Test
Fcc: /home/jgoerzen/REDACTED
User-Agent: mu4e 1.12.3; emacs 29.3
--text follows this line--Date: Sun, 14 Apr 2024 08:38:56 -0500
Message-ID: <87wmp0hxn3.fsf@REDACTED>

Eventually I will get "Failed to send message".

How to Reproduce

Compose as indicated above. It doesn't matter where the point is; C-c C-c will produce the error.

Adding a RET or SPC to the body does not work around the issue. However, if I add even one printable character to the body (eg, 'a'), then it will send fine.

Environment Debian Bookworm, Emacs 29.3

Checklist

Please make sure you all items in the checklist are set/met before filing the ticket. Thank you!

djcb commented 2 months ago

Does this still happen with 1.12.4? Can you repoduce starting from emacs -Q and just mu4e? (I see you didn't check the middle item in the Checklist... is that on purpose?)

jgoerzen commented 2 months ago

Fixed in 1.12.4. Thank you!

(My apologies for forgetting to include the explanation on the middle item; I use Doom and it is quite difficult to separate out my mu4e configuration, but had you not been trivially able to reproduce, I would have gone to that effort)