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: Kevin Rodgers
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
User-agent: Mozilla Thunderbird 0.9 (X11/20041105)

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 <address@hidden>\n")))
>       (save-excursion
>         (progn
>           (goto-char (point-max))
>           (forward-line -1)
>           (insert "Reply-to: address@hidden")))
>       (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 "address@hidden"
      mail-default-reply-to user-mail-address
      mail-from-style  'angles)

--
Kevin Rodgers


reply via email to

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