#!/bin/bash
SMTPTO=akshaysingh@gmail.com
SMTPFROM=akshaysingh1@gmail.com
SMTPSERVER=smtp.googlemail.com:587
SMTPUSER=akshaysingh
SMTPPASS=password
MESSAGE="123"
SUBJECT="THIS IS END."
sendemail -f $SMTPFROM -t $SMTPTO -u $SUBJECT -m $MESSAGE -s $SMTPSERVER -xu $SMTPUSER -xp $SMTPPASS -o tls=yes
Это дает ошибку:
sendemail[3854]: ERROR => Connection attempt to smtp.googlemail.com:587 failed: IO::Socket::INET6: connect: Connection refused