Monday, April 27, 2015

Testing Email using sendmail (linux)

1. Create a Test file with your email body 

cd ~
vi testmail.txt
Subject: Test Mail Delivery
Content-Type: text/html; charset="us_ascii"

Testing Mail Delivery
Scott Jenkins

2. Call sendmail passing in email to, from, subject, and message file
sendmail -f '<email>' '<email>' < testmail.txt
3. Check the maillog on the server
tail –100 /var/log/maillog | grep sent