unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Kevin Rodgers <ihs_4664@yahoo.com>
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	[thread overview]
Message-ID: <32rnhkF3qqskdU1@individual.net> (raw)
In-Reply-To: <Xns95C6933578D71wssddcgisnet@207.69.189.191>

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 <username@domain.net>\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

  reply	other threads:[~2004-12-21 22:48 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-19  9:11 How to send a mail using smtp? Jack
2004-12-19 12:29 ` Daniel Pittman
2004-12-19 13:08 ` D P Schreber
2004-12-19 13:43   ` Jack
2004-12-19 14:43     ` D P Schreber
2004-12-20 13:25       ` Jianbo Zhu
2004-12-20 22:02         ` Duane Winner
2004-12-21  6:50           ` Bob Babcock
2004-12-21 15:26             ` Duane Winner
2004-12-21 18:51               ` How to send a mail using smtp? - solved! (but need help with "Mail From:") Duane Winner
2004-12-21 19:12                 ` Tim McNamara
2004-12-21 19:28                 ` Bob Babcock
2004-12-21 22:48                   ` Kevin Rodgers [this message]
2004-12-22  4:25                     ` Bob Babcock
2004-12-22 17:58                       ` Kevin Rodgers
     [not found] ` <mailman.7260.1103461994.27204.help-gnu-emacs@gnu.org>
2004-12-19 16:09   ` How to send a mail using smtp? Tim McNamara
2004-12-19 17:21     ` D P Schreber
2004-12-19 23:04     ` Daniel Pittman
2004-12-20  0:18       ` Daniel Pittman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=32rnhkF3qqskdU1@individual.net \
    --to=ihs_4664@yahoo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).