Test email from command line

This post is over 3 years old, so please keep in mind that some of its content might not be relevant anymore.

After having setup an email server (eg: using gmail as smtp server or sendmail as a SMART HOST or any other way you want..) you need to test it.

The quickest way, for me, is to do:

 
mail -s Test [email protected] < /dev/null
 

This will send an email with no body text.
Enjoy!

Leave a Reply

Your email address will not be published.