Skip to content

Instantly share code, notes, and snippets.

@xdays
Last active December 28, 2015 18:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xdays/7542364 to your computer and use it in GitHub Desktop.
Save xdays/7542364 to your computer and use it in GitHub Desktop.
two method to specify the sender with mail

two method to specify the sender:

  1. echo "This is the main body of the mail" | mail -s "Subject of the Email" recipent_address@example.com -- -f from_user@example.com

  2. mail -s "Some random subject" -a "From: some@mail.tld" to@mail.tld

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment