help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to send a mail using smtp? - solved! (but need help with "Mail F


From: Bob Babcock
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
User-agent: Xnews/06.07.17

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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]