Created
July 3, 2013 21:59
-
-
Save AlexPashley/5923231 to your computer and use it in GitHub Desktop.
SHELL: Send emails from linux command line
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# inline | |
mail -s "Subject of Message" [email protected] < /dev/null | |
# variables as parameters | |
$MSG="This is the body of the email address" | |
$SUBJET="Test Email Subject" | |
$ADDRESS="[email protected]" | |
echo $MSG | mail -s $SUBJECT $ADDRESS | |
# load content of email from file | |
mail -s $SUBJECT $ADDRESS < /path/to/file.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment