After updating to 5.40.2 (running with Wordpress 5.8 on CentOS with CPanel), I cannot send anymore e-mails with SMTP and Gmail.
Using smtp.gmail.com and port 587 as I have always done returns:
Using smtp.gmail.com and port 465 returns, when sending a test email:
Failed to connect to smtp.gmail.com:465 [SMTP: Invalid response code received from SMTP server while sending email. This is often caused by a misconfiguration in Outbound Email settings. Please verify the settings at Administer CiviCRM >> Global Settings >> Outbound Email (SMTP). (code: -1, response: )]
Using ssl:// has never worked for me and isn't working now (it returns
fsockopen(): unable to connect to ssl://smtp.gmail.com:465 (Unknown error) or
fsockopen(): unable to connect to ssl://smtp.gmail.com:587 (Unknown error)).
openssl s_client -connect smtp.gmail.com:465 and
openssl s_client -starttls smtp -crlf -connect smtp.gmail.com:587 seem to work, so I don't think that's a firewall problem.
Any ideas? Thanks in advance.