81b54b2f5b51fa2d1161d601b239f6456f97921b
By:
darioajr

How to use mailx with CentOS7 and gmail

November 19, 2014 2.8k views

Don't work...
First - openssl s_client -connect smtp.gmail.com:465, don't return value

I ran into another computer , and imported the certificate
Created the info in /etc/mail.rc

account gmail {
set smtp-use-starttls
set ssl-verify=ignore
set smtp-auth=login
set smtp=smtp://smtp.gmail.com:587
set from="name@gmail.com(xxxxxxx)"
set smtp-auth-user=name@gmail.com
set smtp-auth-password=xxxxxxxx
set ssl-verify=ignore
set nss-config-dir=/root/.certs
}

echo -e "Mail body text" | mailx -A gmail -s "Mail subject" xxxxxx@hotmail.com

NO ERROR AND DONT SEND THE MESSAGE

Be the first one to answer this question.