ssmtp: Cannot open smtp.gmail.com:587

14,679

There are a few small typos in your config. You have written:

UseSTARTCTLS=YES
        ^

(I have marked the error) where you should have written:

UseSTARTTLS=YES

And finally the path for the certificates in Trusty should be written not as this:

TLS_CA_File=/etc/pki/tls/certs/ca-bundle.crt

but more correctly as:

TLS_CA_File=/etc/ssl/certs/ca-certificates.crt

These corrections should be enough to get you going :)

References:

Share:
14,679

Related videos on Youtube

Vinoth Kumar
Author by

Vinoth Kumar

Updated on September 18, 2022

Comments

  • Vinoth Kumar
    Vinoth Kumar over 1 year

    I try to send a email using ssmtp but it not working

    My ssmtp config file

    [email protected]
    mailhub=smtp.gmail.com:587
    [email protected]
    AuthPass=*****
    UseTLS=YES
    UseSTARTCTLS=YES
    rewriteDomain=gmail.com
    hostname=localhost
    FromLineOverride=YES
    TLS_CA_File=/etc/pki/tls/certs/ca-bundle.crt
    

    revaliases

    root:[email protected]:smtp.gmail.com:587
    

    I am using Ubuntu 14.04.