This should be simple, but it doesn't seem to be working. I have a very simple script run by cron:
export MAILTOfirstname.lastname@example.org MAILTOemail@example.com echo "MAILTO is set to $MAILTO"
Cron, however, seems to not be picking up the MAILTO variable - the cron e-mails look, in part, like this:
X-Cron-Env: <SHELL=/bin/sh> X-Cron-Env: <HOME=/home/deploy> X-Cron-Env: <PATH=/usr/bin:/bin> X-Cron-Env: <LOGNAME=deploy> Date: Thu, 20 Sep 2012 13:05:01 -0700 MAILTO is set to firstname.lastname@example.org
What am I missing? Why isn't cron picking up the environment variables set in the script?