Simple Command Line Sendmail Test


This is one of those commands I rarely use but can never seem to find it or remember it when I need it so, here it is for easy reference. A simple, quick sendmail example to test from a command line. Replace you@yourdomain.com to your actual email address of course.

Subject only, no body message:
$mail -s "Hello world" you@yourdomain.com

Body message with Subject:
echo "This is the body of the mail message." | mail -s "Hello world" you@yourdomain.com

Information and Links

Join the fray by commenting, tracking what others have to say, or linking to it from your blog.


Other Posts

Write a Comment

Take a moment to comment and tell us what you think. Some basic HTML is allowed for formatting.

Reader Comments

Be the first to leave a comment!