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

From: Eli Zaretskii <[email-masked]>
Date: Thu, 07 Dec 2023 19:40:31 +0200

> Date: Thu, 07 Dec 2023 17:27:21 +0000
> From: [email-masked]
> Cc: [email-masked]
> 
> >> Can you please kindly explain in one sentence where 
> >> message-mail-user-agent and mail-user-agent intervene during the 
> >> process of replying to an email message which I'm reading using Rmail?
> > 
> > When you type 'r', Emacs invokes rmail-reply, which calls 
> > rmail-start-mail, which calls compose-mail. compose-mail invokes the 
> > composition function of mail-user-agent, and when you invoke the 
> > command to send the response, Emacs invokes the send-mail function of 
> > mail-user-agent.
> > 
> > rmail-start-mail (and thus compose-mail) is also called by commands 
> > rmail-mail, rmail-continue, rmail-forward, and a couple of others.
> 
> Thanks. Can you please explain where the variable 
> message-mail-user-agent intervenes in the process above? Because only 
> mail-user-agent appears in your description.

Please take a look at the code of compose-mail.  It is defined in
simple.el.  You will see the answer there.

It might also be educational to look at define-mail-user-agent (in
subr.el), which is the function used to define all the
mail-user-agent's we have in Emacs.  Its doc string describes, among
other things, what constitutes a "mail user agent" in Emacs.