From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: wgreenhouse-sGOZH3hwPm2sTnJN9+BGXg@public.gmane.org (W. Greenhouse) Newsgroups: gmane.emacs.help Subject: Re: Setting function to send emails Date: Mon, 01 Apr 2013 03:30:49 +0000 Message-ID: <87a9pjkjva.fsf@riseup.net> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1364787059 32318 80.91.229.3 (1 Apr 2013 03:30:59 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 1 Apr 2013 03:30:59 +0000 (UTC) To: help-gnu-emacs-mXXj517/zsQ@public.gmane.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org-mXXj517/zsQ@public.gmane.org Mon Apr 01 05:31:27 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UMVSw-0006vS-GW for geh-help-gnu-emacs@m.gmane.org; Mon, 01 Apr 2013 05:31:26 +0200 Original-Received: from localhost ([::1]:58975 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UMVSY-00072Q-1z for geh-help-gnu-emacs@m.gmane.org; Sun, 31 Mar 2013 23:31:02 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:46469) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UMVSK-00072L-Ep for help-gnu-emacs-mXXj517/zsQ@public.gmane.org; Sun, 31 Mar 2013 23:30:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UMVSE-0007tz-Qv for help-gnu-emacs-mXXj517/zsQ@public.gmane.org; Sun, 31 Mar 2013 23:30:48 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:51044) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UMVSE-0007to-KH for help-gnu-emacs-mXXj517/zsQ@public.gmane.org; Sun, 31 Mar 2013 23:30:42 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UMVSZ-0006mT-LK for help-gnu-emacs-mXXj517/zsQ@public.gmane.org; Mon, 01 Apr 2013 05:31:03 +0200 Original-Received: from exit-01c.noisetor.net ([173.254.216.68]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 01 Apr 2013 05:31:03 +0200 Original-Received: from wgreenhouse by exit-01c.noisetor.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 01 Apr 2013 05:31:03 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 34 Original-X-Complaints-To: usenet-dbVV3NMTNubNLxjTenLetw@public.gmane.org X-Gmane-NNTP-Posting-Host: exit-01c.noisetor.net X-Archive: encrypt User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) Cancel-Lock: sha1:osbPKgRoUuM0ppskZzCow0wqLq4= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs-mXXj517/zsQ@public.gmane.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org-mXXj517/zsQ@public.gmane.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org-mXXj517/zsQ@public.gmane.org Xref: news.gmane.org gmane.emacs.help:89858 Archived-At: Hi Fabio, Fabio Gonzalez 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