Computing.Net > Forums > Unix > send mail inside the sctipt

send mail inside the sctipt

Reply to Message Icon

Original Message
Name: johan
Date: December 21, 2007 at 01:15:21 Pacific
Subject: send mail inside the sctipt
OS: Sun
CPU/Ram: 1
Comment:

Hoe I can send message (mail) inside the script?

For example

while sleep 3600
do
if [ “everything is ok” ]
then
:
else
send mail to system user (not e-mail to internet)
fi
done
exit 0


Report Offensive Message For Removal


Response Number 1
Name: johan
Date: December 21, 2007 at 01:23:18 Pacific
Subject: send mail inside the sctipt
Reply: (edit)

My question is just for the command mail (or sendmail).
How mail command work inside the script.

Johan


Report Offensive Follow Up For Removal

Response Number 2
Name: FishMonger
Date: December 21, 2007 at 13:45:57 Pacific
Subject: send mail inside the sctipt
Reply: (edit)

man mail


Report Offensive Follow Up For Removal

Response Number 3
Name: tmettie
Date: January 3, 2008 at 06:52:19 Pacific
Subject: send mail inside the sctipt
Reply: (edit)

else
mailx -s Report < $FILE userid@email.com


Report Offensive Follow Up For Removal







Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: send mail inside the sctipt

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software




How often do you use Computing.Net?

Every Day
Once a Week
Once a Month
This Is My First Time!


View Results

Poll Finishes In 4 Days.
Discuss in The Lounge