yum -y update
yum install -y mailx
We can now start sending e-mails using
create a symbolic link
ln -s /bin/mailx /bin/email
###Set an External SMTP Server to Relay E-Mails
vi /etc/mail.rc
edit
set smtp=smtps://smtp.gmail.com:465
set smtp-auth=login
set smtp-auth-user=USERNAME@YOURDOMAIN.COM
set smtp-auth-password=YOURPASSWORD
set ssl-verify=ignore
set nss-config-dir=/etc/pki/nssdb/
example usage :
echo "Your message" | mail -v -s "Message Subject" email@address
Hello,
Below are my mail.rc files configurations and still I'm getting an error.
#SMTP Configuration
set smtp-use-starttls
set ssl-verify=ignore
set smtp-auth=login
set smtp=smtp://smtp_server_I_want_to_connect:587
set from="my_email_address"
set smtp-auth-user=my_email_address
set smtp-auth-password=my_password
set nss-config-dir=/etc/pki/nss
#Error.1
after changing
set nss-config-dir=/etc/pki/nss -> set nss-config-dir=/etc/pki/nssdb
Error.2
220 2.0.0 SMTP server ready
Error in certificate: Peer's certificate issuer is not recognized.
Please help and thank you in advanced.