help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Setting function to send emails


From: W. Greenhouse
Subject: Re: Setting function to send emails
Date: Mon, 01 Apr 2013 03:30:49 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux)

Hi Fabio,

Fabio Gonzalez <fabio@gnu.org> writes:

> I writed a function to be called, every
> time that emacs need to send a email.
>
> I added this new function with the code:
> (setq send-mail-function 'f-mail-send)
>
> Works well when I use M-x mail.
> But not works when a reply emails.
>
> I give a look at the Emacs source code,
> but I do not understand why this happen.

The confusion is because Emacs includes two libraries for mail
composition: `mail' and `message.'  Each provides a major mode of the
same name. `mail-mode' is most often used with RMAIL; `message-mode' with
Gnus.  `send-mail-function' sets up sending for mail-mode, while
`message-send-mail-function' configures sending for message-mode.
Perhaps when replying in some context you unexpectedly found yourself in
message-mode rather than mail-mode.

The mail composition package to be used throughout Emacs can be set with
the `mail-user-agent' variable.  If you want to compose with mail-mode
everywhere, you should (setq mail-user-agent 'sendmail-user-agent), or
configure this using the Customize interface.  Then your custom send
function will get used consistently.

-- 
BOFH excuse #437:

crop circles in the corn shell




reply via email to

[Prev in Thread] Current Thread [Next in Thread]