Created
April 5, 2012 03:00
-
-
Save anonymous/2307654 to your computer and use it in GitHub Desktop.
Send gmail from command line (easier).
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 gmail () { | |
$from=<your_email> | |
$user=<your_email> | |
stty -echo </dev/tty; | |
read -p "Password: " passw < /dev/tty | |
echo | |
stty </dev/tty echo | |
opts="-S smtp-use-starttls \ | |
-S ssl-verify=ignore \ | |
-S smtp-auth=login \ | |
-S smtp=smtp://smtp.gmail.com:587 \ | |
-S from=$from \ | |
-S smtp-auth-user=$user \ | |
-S smtp-auth-password=$passw \ | |
-S ssl-verify=ignore" | |
mailx -v $opts $@ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment