Here is a small script that used to send email from bash,
#!/bin/bash #Enter the email address to which we need to send the message EMAIL="**@talk2melbin.com" #Enter the subject of the email SUBJECT="Alert Service Down" #Enter the body of the message, read it from a file MESSAGE="/tmp/monitoring.tmp" #Mail command to send the email /bin/mail -s "$SUBJECT" "$EMAIL" < $MESSAGE
Cheers!
Melbin Mathew
www.talk2melbin.com
Melbin Mathew
I am Melbin Mathew, Systems Engineer from Kerala, India. I live with my parents, daughter and my wonderful wife. I graduated in 2004 with a bachelor’s degree in Electronics and Hardware from Mahatma Gandhi University, Kottayam and completed certification in MCITP, RHCE, CCNA, VCP ...Read More
Latest posts by Melbin Mathew (see all)
- VMware virtual IDE to virtual SCSI hard disk conversion steps – Windows XP - August 6, 2015
- Stop Error “CRITICAL_STRUCTURE_CORRUPTION - August 5, 2015
- Error installing Windows server role and feature required for the Exchange 2010 - December 3, 2013