Created
September 29, 2015 05:39
-
-
Save MaxPleaner/1a154434c03f387c7c2b to your computer and use it in GitHub Desktop.
send_email function for bashrc
This file contains hidden or 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
function send_email { | |
curl --url "smtps://smtp.gmail.com:465" --ssl-reqd \ | |
--mail-from "[email protected]" --mail-rcpt "$1" \ | |
--upload-file $2 --user "[email protected]:$GMAIL_PASSWORD" --insecure | |
} | |
# replace symbolic.contrast with your email | |
# and export GMAIL_PASSWORD | |
# command line options are <recipient> <mail file> | |
# i.e. send_email [email protected] mail.txt | |
This file contains hidden or 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
From: "Max Pleaner" <[email protected]> | |
To: "Max Pleaner" <[email protected]> | |
Subject: This is a test | |
Hello, | |
this is an email | |
Bye! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment