<<< Date Index >>>     <<< Thread Index >>>

Re: from variable Vs. my_hdr From:



On Sun, Sep 19, 2004 at 04:37:45AM +0200, Sébastien Hinderer quoth:
> Dear all,
> 
> First of all, let me thank you for the excellent quality of the list, for
> me it's a pleasure to follow it, really.
> 
> Now for the question. Is there a difference between defining the from
> variable and using a my_hdr From: command to define the From header ?
> I RTFM, but however can't figure out the answer. However I noticed the
> use_from variable, which I guess has a link with the question.

Yes, there is a difference.

As the manpage says, $from is used for your default, and my_hdr is used 
to override it. The subtlety that is missed there is that from is 
consulted right when you first compose a message, and not afterward. 
Changing the value of $from once you've started an email will not 
actually change who the mail is from, but using my_hdr From: *will*. 
Thus, if you use a send-hook, for example, to change where the mail is 
from, you'll need to use my_hdr because $from won't change anything.

Also, if use_from is unset (or set to "no"), the $from variable is 
ignored completely, while my_hdr will not be ignored.

~Kyle
-- 
If I were you, I'd run!
-- Mesh-Head
If you were me, you'd be good-looking.
-- the Six-String Samurai

Attachment: signature.asc
Description: Digital signature