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

Re: Mutt in a script



On 3 Dec 2008 13:08 +1100, by mutt@xxxxxxxxxxx (Peter):
> However if I run the same script from a program I am using I get the LOGGER 
> statement in the messages file but it doesn't send email?

Usually when a program works in one environment (command line) but
fails in another (script, cron, etc.), the culprit is some difference
in the environment settings, and most often, $PATH. Make sure that
when the script is executed, the environment variables are all set to
what you expect. ("env" is your friend here.)

You can also save mutt's exit status immediately after the execution
attempt; it is in $? in sh-like shells (sh, bash, and maybe others as
well).

-- 
Michael Kjörling .. michael@xxxxxxxxxxx .. http://michael.kjorling.se
* ..... No bird soars too high if he soars with his own wings ..... *
* ENCRYPTED email preferred -- OpenPGP key ID: 0x 758F8749 BDE9ADA6 *
* ASCII Ribbon Campaign: Against HTML mail, proprietary attachments *

Attachment: signature.asc
Description: Digital signature