salesagility / SuiteCRM-Core

SuiteCRM - Open source CRM for the world
https://www.suitecrm.com
GNU Affero General Public License v3.0
173 stars 118 forks source link

Unable to set up SMTP connection with Amazon SES for outbound mail #234

Open inlog opened 1 year ago

inlog commented 1 year ago

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 WEy6B0sy8EcpbqKH2cBW

1: CLIENT → SERVER: EHLO mysite.com

2: SERVER → CLIENT: 250-email-smtp.amazonaws.com 250-8BITMIME 250-STARTTLS 250-AUTH PLAIN LOGIN 250 Ok

1: 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 Ok

1: CLIENT → SERVER: AUTH LOGIN

2: SERVER → CLIENT: 334 VXNlcm5hbWU6

1: CLIENT → SERVER: —obfuscated— 2: SERVER → CLIENT: 334 UGFzc3dvcmQ6

1: CLIENT → SERVER: —obfuscated— 2: SERVER → CLIENT: 535 Authentication Credentials Invalid

1: SMTP ERROR: Password command failed: 535 Authentication Credentials Invalid

3: SMTP Error: Could not authenticate. 1: CLIENT → SERVER: QUIT

2: 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 SuiteCRM 8.2.4

johnM2401 commented 1 year ago

Hey!

Thanks for getting in touch!

Would you be able to test your connection to the Amazon SES SMTP service using the following steps?: https://docs.aws.amazon.com/ses/latest/dg/send-email-smtp-client-command-line.html

This will help us rule out whether the issue stems from within the CRM or with the service itself

Are you able to access/use the Amazon SMTP service via command line as above?


I've also found a Forum post that (hopefully) can give some pointers: https://community.suitecrm.com/t/smtp-outbound-configuration-on-amazon-web-services-aws/81332

On the off chance you haven't already, it may be worth checking that the Email Address is set up / verified as noted in the forum post above


Please let us know how you get on!

Thanks!

serhiisamko091184 commented 3 months ago

Hello @inlog

This issue has been marked as stale because there has been no recent activity. It will be closed if no further activity occurs. Thanks one more time.

Regards, Serhii