Email Alerts not working

I referred to this link

and my configuration looks like this:

# Email transport
transport_email_enabled = true
transport_email_hostname = smtp.google.com
transport_email_port = 465
transport_email_use_auth = true
transport_email_use_tls = false
transport_email_use_ssl = true
transport_email_auth_username = email@mydomain.tld
transport_email_auth_password = 'Password'
transport_email_subject_prefix = [graylog]
#transport_email_from_email = graylog@mydomain.tld

SSL and TLS were not working together. So has to toggle one of them off (false).
I tried with a Less secure app On also with APP Password, still same facing the same issue.
I am not able to figure out the root of this issue if it is related to Gmail authentication or the gray server.
Tried both SSL and TLS on their respective ports (Port for SSL: 465 Port for TLS/STARTTLS: 587) same issue.

I have been trying it for more than a week now, no luck.
Any help would be appreciated.

Thank you.

Can you elaborate on what you mean by “not working?” Are you getting log messages that indicate the failures? Are you seeing something in the UI? Just the config doesn’t give us much to go off of.


This is the error I am getting.
Error:
An error occurred while trying to send an email! The Graylog server encountered an error while trying to send an email. This is the detailed error message: org.apache.commons.mail.EmailException: Sending the email to the following server failed: smtp.google.com:465 (com.sun.mail.util. MailConnectException: Couldn’t connect to host, port: smtp.google.com, 465; timeout 60000; nested exception is: java.net.SocketTimeoutException: connect timed out)

Finally able to resolve this issue has to use smtp.gmail.com instead of smtp.google.com.
Working like charm now.