Method 1:

$ mail -s “Subject: Test email from linux server” info@test.com

Press the “Return” key

Enter the body part of the email

Press ctrl + D

Enter a CC email if you would like (e.g. info2@test.com)

Press ctrl + D again

Then check the mail box to see if the mail has arrived.


Method 2:

$ echo “Enter the body part of the email” | mail -s “Subject: Test email from linux server” info@test.com -c info2@test.com