On Sun, Aug 23, 2009 at 09:05:07AM -0400, Patrick Shanahan wrote:
Date: Sun, 23 Aug 2009 09:05:07 -0400
From: Patrick Shanahan <ptilopt...@gmail.com>
To: mutt-users@mutt.org
Subject: Re: local mail
User-Agent: Mutt/1.5.20 (2009-06-14)
* Gerard Robin <g.rob...@free.fr> [08-23-09 02:27]:
>A perhaps simpler solution would be to create a second version of your
>~/.muttrc, maybe ~/.muttrc.cron, and call it when mailing from cron. Set
>the desired "From" address in .muttrc.cron.
Thanks, with this method it works fine.
(with send-hook it does not work ... )
Then, perhaps you have failed to execute it properly?
I put the following lines in my .muttrc:
# my_hdr From: g.rob...@free.fr
---------------------------8<--------------------------
send-hook . my_hdr From:g.rob...@free.fr
send-hook @name_of_my_box my_hdr From: us...@name_of_my_box
---------------------------8<--------------------------
If I send a mail to us...@name_of_my_box it work as expected
If I send a mail to f...@hotmail.com it work as expected
but my command in my crontab is:
echo "perform full charge of the battery" | /usr/bin/mutt -s "battery"
us...@name_of_my_box
When I run this command, the From of the mail is us...@free.fr instead of
us...@name_of_my_box
I can't figure out what I am missing ? ...
>There is *much* very good explanatin in the fine manual :^).
I do not agree with you regarding send-hook ...
What do you find lacking?
I do not quite understand the purpose of "send-hook . 'unmy_hdr'"
However, if I do not write the line "send-hook . my_hdr From:g.rob...@free.fr"
this does not work well when I send a mail to f...@hotmail.com.
Finally I think I am wrong, nothing is lacking if we take the time to
follow all the links ($from, $realname in chap 4) but after following all
the links I'm still not solve the problem of the command in crontab ?
Though it would be nice if there was a little more examples ...
--
Patrick Shanahan Plainfield, Indiana, USA HOG # US1244711
http://wahoo.no-ip.org Photo Album: http://wahoo.no-ip.org/gallery2
Registered Linux User #207535 @ http://counter.li.org
--
GĂ©rard