sendemail

Configuration to use sendemail with Gmail in a bash script

Requried packages (in Debian): libio-socket-ssl-perl libnet-ssleay-perl perl sendemail


Variables                                                       
from="username@gmail.com"
to="destination@mail.com"
cc="cc@mail.com"

subject="Subject text"
message="Message text"

server="smtp.gmail.com:587"
user="username"
password="password"

options="tls=yes"

Command
sendemail -f $from -t $to -cc $cc -u "$subject" -m "$message" -s $server -xu $user -xp $password -o $options > /dev/null