Php mail trouble

Keywords: General - Linux - Technical issue - Email configuration (SMTP)
Description:
I have been trying to follow the advice given in the following topic: Why can't I use PHP's mail() function on this Bitnami server?

Updated php.ini with

sendmail_path = "env -i /usr/sbin/sendmail -t -i"

I installed sendmail, then restarted using the following command

sudo /opt/bitnami/ctlscript.sh restart php-fpm

Now it seems like the email goes through on my website but it never shows up. /var/log/mail.log has the following error (I changed the email and ip), any advice is greatly appreciated!:

Apr 29 05:59:14 ip-22-22-22-22sm-mta[14863]: 13T4uEjs014322: to=<xyz123@gmail.com>, ctladdr=<daemon@ip-123-22-11-12.us-west-2.compute.internal> (1/1), delay=01:03:00, xdelay=00:05:14, mailer=esmtp, pri=660650, relay=alt4.gmail-smtp-in.l.google.com. [22.22.22.22], dsn=4.0.0, stat=Deferred: Connection timed out with alt4.gmail-smtp-in.l.google.com.

Thank you for your time

Hi @publicjustsomedude,

A connection time out problem means that your server can’t connect to the Google’s servers so we suggest you check these guides to configure your Gmail account

https://docs.bitnami.com/general/how-to/troubleshoot-smtp-issues/
https://support.google.com/accounts/answer/6010255?hl=en

Jota thank you so much I will give it a try tomorrow evening.