Subject: Re: bug#34992: 26.1; message-send-mail-with-mailclient mangles MIME messages

From: David Bremner <[email-masked]>
Date: Mon, 25 Mar 2019 13:09:30 -0300

Eli Zaretskii <[email-masked]> writes:

>> 
>> Notice that the whole encoded mime message is wrapped in a text/plain
>> part, which breaks most (all?) MUAs ability to read the message.
>> 
>> I'm not sure what a sensible fix is here.
>
> One possibility would be for message-mode to refuse to add attachments
> when message-send-mail-function is set up to use the system mail
> client.  The user should be told to attach using the mail client
> facilities instead.

That's a possibility, but something would have to be done for the other
code that programmatically adds attachments via mml tags. In addition to
debian-bug.el, a quick search suggests Gnus and mh-e (in emacs) and mu4e
and "Emacs Muse" (outside of emacs) are also vulnerable to this
problem. I would not be surprised if notmuch-emacs was as well, but I
didn't see it.

I guess the "interface" of send-mail-function and
message-send-mail-function is not very well defined, but it still feels
wrong to have radically different transport behaviour for different
choices.  It almost seems like there should be a different customizable
variable(s) with different valid values for client code that needs more
guarantees.