Kurinchi Blogger Scribbles …


Dec 15
2011

How to check if linux server can send out email via command line?

Last updated: December 15th, 2011

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

Tags: , , ,

Leave a Reply


Valid HTML 4.01 Strict  Valid HTML 4.01 Strict