2

When I attach files using M-x mml-attach-file,

C-x m does attachments as expected but

M-x mail just sends the text

<#part type="text/plain" filename="~/Downloads/coding_style.c" disposition=attachment description="modified coding_style.c"> <#/part>

Why are these different when sending mail works with both?

Tim S.
  • 115
  • 1
  • 7

2 Answers2

5

I know nothing about mail in Emacs, but running C-h k C-x m tells me that C-x m runs the command compose-mail, which is different from mail. This is presumably why they behave differently. You can find out more with C-h f compose-mail and C-h f mail.

Resigned June 2023
  • 1,502
  • 15
  • 20
0

C-x m calls compose-mail but not mail. According to documentation compose-mail:

Start composing a mail message to send. This uses the user's chosen mail composition package as selected with the variable `mail-user-agent'.

for mail-user-agent:

Your preference for a mail composition package.

but mail from sendmail.el:

Edit a message to be sent.

So, if set, compose-mail could call mail from sendmail.el for creating and sending email.

Konstantin Morenko
  • 1,407
  • 9
  • 19