Skip to content

Instantly share code, notes, and snippets.

Created Apr 5, 2012

What would you like to do?
Send gmail from command line (easier).
function gmail () {
stty -echo </dev/tty;
read -p "Password: " passw < /dev/tty
stty </dev/tty echo
opts="-S smtp-use-starttls \
-S ssl-verify=ignore \
-S smtp-auth=login \
-S smtp=smtp:// \
-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
You can’t perform that action at this time.