Originally Posted by yusufs
Thanks colucix, but for the same .. is it necessary to have sendmail configured in that machine..
If I'm not wrong, cron uses sendmail by default. Maybe someone can help to clarify this point.
If so , is there anyway we can change the subject of the mail as per user requirements or wish
No. The crontab does not permit such a refinement. However if the user needs some output to be e-mailed, he/she can always use sendmail (or any other mailer) inside the script. E.g. something like
/usr/sbin/sendmail "firstname.lastname@example.org" << EOF
From: colucix <email@example.com>
To: Mario Rossi <firstname.lastname@example.org>
Subject: my personalized subject $VARIABLE
`date "+%A %e %b %Y %T"` - my message here
in this way you can send (in the subject or in the body of the e-mail) the content of any variable or any log generated by the script itself or the output of any command. Just an idea.