Subject: bug#67638: Description of the variable message-mail-user-agent in Emacs 29.1

From: CHENG Gao <[email-masked]>
Date: Fri, 08 Dec 2023 21:01:17 +0800

Grepping shows:

,----
| 
| (define-mail-user-agent 'gnus-user-agent 'gnus-msg-mail 'message-send-and-exit 'message-kill-buffer 'message-send-hook)
| (define-mail-user-agent 'message-user-agent 'message-mail 'message-send-and-exit 'message-kill-buffer 'message-send-hook)
| (define-mail-user-agent 'mh-e-user-agent 'mh-user-agent-compose 'mh-send-letter 'mh-fully-kill-draft 'mh-before-send-letter-hook)
| (define-mail-user-agent 'sendmail-user-agent #'sendmail-user-agent-compose #'mail-send-and-exit)
`----

Seems they are all mail-user-agents defined in current Emacs, that
define how to compose mail (using Mail mode in sendmail.el or Message mode
in message.el) and how to send mail (using sendmail in sendmail.el or
smtp in smtpmail.el).

My understanding is

For composing mail, gnus-user-agent is like message-user-agent plus, with some extra
headers and rendering

Other than sending mail, sendmail package is also for composing mail
(Mail mode), as used by RMAIL IIUC.

Not sure about mh-e-user-agent. Seems it uses its own composing mode
other than Mail and Message modes. And uses sendmail package for sending
mail.

Among these four mail-user-agents defined, only gnus-user-agent is
used also as variable (to define what to put in User-Agent header of
mail or news message). All others are only used for property list of
named symbols. And only COMPOSEFUNC & SENDFUNC of sendmail-user-agent
are used in current Emacs codes (for bug reporting).

I'd say it is in fact fairly complicated and to some extend misleading
(esp. sendmail-user-agent serving composition besides delivery).