I want the server able to send mail via gmail smtp. The installation of msmtp was successful. I able to send using msmtp via the command line. However, when I try to send via php, it got me this error.
postfix/smtp[11241]: connect to gmail-smtp-in.l.google.com[74.125.200.27]:25: Connection timed out
postfix/smtp[11241]: connect to gmail-smtp-in.l.google.com[2404:6800:4003:c00::1b]:25: Network is unreachable connect to alt2.gmail-smtp-in.l.google.com[74.125.25.26]:25: Connection timed out
postfix/smtp[11241]: 8F4DB10D10: to=, relay=none, delay=1086, delays=993/0.13/93/0, dsn=4.4.1, status=deferred (connect to alt2.gmail-smtp-in.l.google.com[74.125.25.26]:25: Connection timed out)
I had change the postfix config file
inet_interfaces = localhost
to
inet_interfaces = all
But still no avail
Any idea why?
By the way, I am using Centos with LEMP stack.