unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Bob Babcock <wssddc@nospam.gis.net>
Subject: Re: How to send a mail using smtp? - solved! (but need help with "Mail From:")
Date: Tue, 21 Dec 2004 19:28:16 GMT	[thread overview]
Message-ID: <Xns95C6933578D71wssddcgisnet@207.69.189.191> (raw)
In-Reply-To: 2h_xd.17273$uM5.13591@bgtnsc05-news.ops.worldnet.att.net

Duane Winner <duanewinner@att.net> wrote in
news:2h_xd.17273$uM5.13591@bgtnsc05-news.ops.worldnet.att.net: 

> 6. So now my only problem is controlling the "MAIL FROM:" and "From:" 
> fields so that they return "myispaccountname@myisp.domain.net" instead
> of "mylocalaccountname@mylocalhost".

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))))

  parent reply	other threads:[~2004-12-21 19:28 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 [this message]
2004-12-21 22:48                   ` Kevin Rodgers
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=Xns95C6933578D71wssddcgisnet@207.69.189.191 \
    --to=wssddc@nospam.gis.net \
    /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).