unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Setting function to send emails
@ 2013-03-31  4:50 Fabio Gonzalez
  2013-04-01  3:30 ` W. Greenhouse
  0 siblings, 1 reply; 2+ messages in thread
From: Fabio Gonzalez @ 2013-03-31  4:50 UTC (permalink / raw)
  To: help-gnu-emacs

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.
-- 
Fabio Gonzalez
Author and Maintainer of GNU fcrypt
http://www.gnu.org/software/fcrypt




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Setting function to send emails
  2013-03-31  4:50 Setting function to send emails Fabio Gonzalez
@ 2013-04-01  3:30 ` W. Greenhouse
  0 siblings, 0 replies; 2+ messages in thread
From: W. Greenhouse @ 2013-04-01  3:30 UTC (permalink / raw)
  To: help-gnu-emacs-mXXj517/zsQ

Hi Fabio,

Fabio Gonzalez <fabio-mXXj517/zsQ@public.gmane.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




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-04-01  3:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-31  4:50 Setting function to send emails Fabio Gonzalez
2013-04-01  3:30 ` W. Greenhouse

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).