Send Email from Command Line Using Exim on Ubuntu Linux

Sending email via command line using Exim in Ubuntu Linux is really easy. All it takes is one line of code. Simply SSH into your server and type in the following command to send an email using Exim:

echo "Did you receive this email?" | mail -s "No Special Email Subject" example@domain.com