This issue has been popping out now and then. It is Drupal 7 and CiviCRM 5.76.1. Same SMTP Credentials works for civicrm/admin/setting/smtp?reset=1 but the "Save & test" at civicrm/admin/mailSettings?reset=1 (IMAP + Use SSL) returns
"[exception] => ezcMailTransportException: "An error occured while sending or receiving mail. Failed to connect to the server: email-smtp.ap-southeast-2.amazonaws.com:993."
Both commands below return time-outs ( see the docs )
- openssl s_client -connect email-smtp.ap-southeast-2.amazonaws.com:993
- telnet email-smtp.ap-southeast-2.amazonaws.com 993
Messing with ports (587/465) at www/drupal/sites/all/modules/civicrm/vendor/zetacomponents/mail/src/transports/imap/imap_transport.php:401 doesn't help much: the 465 responded with "An error occured while sending or receiving mail. The connection to the IMAP server is ok, but a negative response from server was received. Try again later."
The issue has been happening for a while, the server is set to be checked once in a 3 months so it is not because of the most recent CiviCRM 5.76.1 upgrade. Summer IMAP changes at Amazon perhaps? Please advise, thanks!