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

Re: How to specify the 'From:' field in command line



On Tue, Apr 17, 2007 at 06:13:52PM +0100, Derek.Li@xxxxxxxxxxxxxxxxxxx wrote:
> 
> Do you guys know how to specify the 'From:' field in command line?
> Basically I want to specify who sends the mail, or the reply address. 
> 
> mutt -s 'test test' -a myattachment receiver@xxxxx < /dev/null

You can set $EMAIL in your environment (man mutt). For that to work, you
/may/ have to also do -F/dev/null so that your .muttrc is ignored (I did
some tests with this yesterday but forget whether I had to do that or
not). Either that, or do "-F somefile" where somefile is a special
.muttrc.

I checked, and you can set the realname in $EMAIL too, like:

EMAIL="My Name <foo@xxxxxxxxxxx>"

w