Last active
May 24, 2018 20:03
-
-
Save dade80vr/ec7238e8fafa8b5d32459afe56f2c8fb to your computer and use it in GitHub Desktop.
Easy send mail from bash/shell to your preferred recipient with sendemail
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
#!/bin/bash | |
recipient="[email protected]" | |
smtp="smtp.gmail.com" | |
oldmode=`stty -g` | |
echo -n "Insert your Gmail pass: " | |
stty -echo | |
read gpass | |
stty $oldmode | |
echo | |
echo | |
sendemail -f $recipient -t $1 -u $2 -o tls=yes -s $smtp -xu $recipient -xp $gpass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment