5

send email issue in unix

view full story
linux-howto

http://www.unix.com – Hi, I am trying to send the contents of a file as email in unix.I am using the below code to do this.But when i get the email i see that SUBJECT and TO is blank. Can you please let me know why it is blank? Also the FROM address comes as admin@myhost. Is there any way i can set FROM to user defined value? Code:     SUBJECT="Automated Security Alert"      TO="[email protected]"      MESSAGE="/export/home/admin/bin/getStatus2.txt"      /usr/bin/mail -s "$SUBJECT" "$TO" < $MESSAGE thanks (HowTos)