From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.help Subject: Re: How to send a mail using smtp? - solved! (but need help with "Mail From:") Date: Tue, 21 Dec 2004 15:48:17 -0700 Message-ID: <32rnhkF3qqskdU1@individual.net> References: <32lcr2F2g1p01U1@individual.net> <32lid1F3nq6ivU1@individual.net> <41C74C31.8040305@att.net> <0hXxd.16785$uM5.7110@bgtnsc05-news.ops.worldnet.att.net> <2h_xd.17273$uM5.13591@bgtnsc05-news.ops.worldnet.att.net> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1103669373 10308 80.91.229.6 (21 Dec 2004 22:49:33 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 21 Dec 2004 22:49:33 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Dec 21 23:49:27 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1Cgsom-0007PS-00 for ; Tue, 21 Dec 2004 23:49:27 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CgszI-0002vM-Jp for geh-help-gnu-emacs@m.gmane.org; Tue, 21 Dec 2004 18:00:16 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!newsmi-us.news.garr.it!newsmi-eu.news.garr.it!NewsITBone-GARR!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 36 Original-X-Trace: individual.net PiBh45++YZbA/RyhtBFgIA1G6RX/FBu2DCp6C3ENTbyJjNb7I= User-Agent: Mozilla Thunderbird 0.9 (X11/20041105) X-Accept-Language: en-us, en In-Reply-To: Original-Xref: shelby.stanford.edu gnu.emacs.help:127459 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:22908 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:22908 Bob Babcock wrote: > There's probably a better way, but for a long time I have been using the > following hook to insert the From: and Reply-to: lines. (Note that I'm > doing this in emacs 20.7. My ISP isn't yet _requiring_ authenticated smtp, > so while I've gotten it to work in 21.3, I haven't moved everything else to > that version yet.) > > (add-hook 'mail-setup-hook > (function > (lambda () > (setq fill-column 77) > (turn-on-auto-fill) > (save-excursion > (progn > (goto-char (point-min)) > (forward-line 1) > (insert "From: My Name \n"))) > (save-excursion > (progn > (goto-char (point-max)) > (forward-line -1) > (insert "Reply-to: username@domain.net\n"))) > (setq tab-width 8)))) Yes, there's a better way, since Emacs has anticipated your problems and provided variables to solve them: (setq user-full-name "My Name" user-mail-address "username@domain.net" mail-default-reply-to user-mail-address mail-from-style 'angles) -- Kevin Rodgers