Read more

How to send a test e-mail from shell

Arne Hartherz
April 04, 2011Software engineer at makandra GmbH

If you want to manually check if e-mail delivery works on a machine by sending an e-mail you can run the following:
mail -s Test someone@example.com < /dev/null

Illustration UI/UX Design

UI/UX Design by makandra brand

We make sure that your target audience has the best possible experience with your digital product. You get:

  • Design tailored to your audience
  • Proven processes customized to your needs
  • An expert team of experienced designers
Read more Show archive.org snapshot

This will send an empty e-mail with "Test" as its subject to someone@example.com.

If you want it to contain a message body, call mail -s Test someone@example.com only; the mail application will then read your input from stdin. Finish your message by sending EOT Show archive.org snapshot with Ctrl-D -- if you are asked for anything else (like CC addresses) you may press Ctrl-D again.

Posted by Arne Hartherz to makandra dev (2011-04-04 13:58)