Linux command to test mail() function:

echo "test email body." | mail -s "test email subject"


  1. replace “test email body” with the body copy of your test email
  2. replace “test email subject” with the subject line for your test email
  3. replace with the email address to send the test to
  4. optionally includ -c to CC another email address
  5. optionally include -b to BCC another email address
  6. For a longer email body message start with mail(), return, and Control+D as the escape sequence when finished
0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *