AWS says:
Amazon SES supports two mechanisms for establishing a TLS-encrypted connection: STARTTLS and TLS Wrapper. Check the documentation for your software to determine whether it supports STARTTLS, TLS Wrapper, or both.
To set up a STARTTLS connection, the SMTP client connects to the Amazon SES SMTP endpoint on port 25, 587, or 2587
Hangs on port 25.
Result 587 (TLS), 2587 (TLS), 465 (SSL), 2465 (SSL):
3: Connection: opening to email-smtp.eu-central-1.amazonaws.com:2587, timeout=300, options=array()
3: Connection: opened
2: SERVER → CLIENT: 220 email-smtp.amazonaws.com ESMTP SimpleEmailService-d-LQS6YRE9N WEy6B0sy8EcpbqKH2cBW1: CLIENT → SERVER: EHLO mysite.com
2: SERVER → CLIENT: 250-email-smtp.amazonaws.com
250-8BITMIME
250-STARTTLS
250-AUTH PLAIN LOGIN
250 Ok1: CLIENT → SERVER: STARTTLS
2: SERVER → CLIENT: 220 Ready to start TLS
1: CLIENT → SERVER: EHLO mysite.com
2: SERVER → CLIENT: 250-email-smtp.amazonaws.com
250-8BITMIME
250-STARTTLS
250-AUTH PLAIN LOGIN
250 Ok1: CLIENT → SERVER: AUTH LOGIN
2: SERVER → CLIENT: 334 VXNlcm5hbWU6
1: CLIENT → SERVER: —obfuscated—
2: SERVER → CLIENT: 334 UGFzc3dvcmQ61: CLIENT → SERVER: —obfuscated—
2: SERVER → CLIENT: 535 Authentication Credentials Invalid1: SMTP ERROR: Password command failed: 535 Authentication Credentials Invalid
3: SMTP Error: Could not authenticate.
1: CLIENT → SERVER: QUIT2: SERVER → CLIENT: 221 Bye
3: Connection: closed
3: SMTP Error: Could not authenticate.
To set up a TLS Wrapper connection, the SMTP client connects to the Amazon SES SMTP endpoint on port 465 or 2465
Result 465 (TLS), 2465 (TLS):
3: Connection: opening to email-smtp.eu-central-1.amazonaws.com:465, timeout=300, options=array()
3: Connection: opened
2: SERVER → CLIENT:
3: Connection: closing due to error
3: Connection: closed
3: SMTP connect() failed. Troubleshooting · PHPMailer/PHPMailer Wiki · GitHub
Endpoint: email-smtp.eu-central-1.amazonaws.com
Credentials are right.
PHP 8.0