rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm
yum install ssmtp
Configuration is rather simple. Just change the following values in your /etc/ssmtp/ssmtp.conf:
root=noreply@youdomain.com
AuthUser=noreply@yourdomain.com
AuthPass=password
FromLineOverride=YES
mailhub=smtp.gmail.com:587
UseSTARTTLS=YES
To test just run a following command("-v" should be used for debugging):
echo "test" | ssmtp -v -s "Test" genadyg@exelate.com
To use sSmtp in unix script:
ssmtp myemailaddress@gmail.com < msg.txt
msg.txt is a simple text using the proper formatting for sSMTP:
To: toaddress@gmail.com
From: fromaddress@gmail.com
Subject: alert
Message text
No comments:
Post a Comment