Send Email in One Line

I use this nifty one liner to test if a Linux machine can send emails.

$ echo "This is the body of the email" | mail -s "This is the subject" rai@email.com

You need to install the package mailx (Red Hat or Fedora) to have the mail command.