Skip to content

Instantly share code, notes, and snippets.

@dade80vr
Last active May 24, 2018 20:03
Show Gist options
  • Save dade80vr/ec7238e8fafa8b5d32459afe56f2c8fb to your computer and use it in GitHub Desktop.
Save dade80vr/ec7238e8fafa8b5d32459afe56f2c8fb to your computer and use it in GitHub Desktop.
Easy send mail from bash/shell to your preferred recipient with sendemail
#!/bin/bash
recipient="your@mail.com"
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