I'm using mailx and sendmail functions to send mail from set of solaris machine with different versions. And the script send mail for most of the machine. Still issue is there on sending out mail for few servers. But there is no error shown while execute this script.
uuencode report.html report.html | mailx -s "mail subject" firstname.lastname@example.org
SELFDIR=`pwd` DOCROOT=$SELFDIR"/" MAIL_FROM="email@example.com" MAIL_TO="firstname.lastname@example.org" echo "From: "$MAIL_FROM > $DOCROOT"header.txt" echo "To: "$MAIL_TO >> $DOCROOT"header.txt" echo "Subject: The mail subject " >> $DOCROOT"header.txt" echo "Content-Type: text/html" >> $DOCROOT"header.txt" cat $DOCROOT"header.txt" $DOCROOT"report.html" | /usr/lib/sendmail -t
Simply is there any way to find the error or logs of the mail delivery failed to recognize the reason of failture?