Amazon SES failing to send emails

Hi there

I’m keeping struggling even after reading all topics on this forum and outside it.
I’ve just got my Discourse set up on a new server and configured it with my AWS Credentials.

Same credential is used on same server, same domain and works just fine.

I’m getting this:

==================== MAIL TEST ====================
For a robust test, get an address from http://www.mail-tester.com/
Or just send a test message to yourself.
Email address for mail test? ('n' to skip) [talk@xyz.com]:
Sending mail to talk@xyz.com. . .
Testing sending to talk@xyz.com using <MYAMAZONUSER>:<MYAMAZONPASS>@email-smtp.us-east-1.amazonaws.com:587.
SMTP server connection successful.
Sending to talk@xyz.com. . .
Sending mail failed.
Replacing: SMTP_PASSWORD
Replacing: LETSENCRYPT_ACCOUNT_EMAIL
Replacing: DEVELOPER_EMAILS
Replacing: DISCOURSE_DB_PASSWORD
Replacing: Sending mail to

==================== DONE! ====================

My config looks like:

  DISCOURSE_SMTP_ADDRESS: email-smtp.us-east-1.amazonaws.com
  DISCOURSE_SMTP_PORT: 587
  DISCOURSE_SMTP_USER_NAME: <MYAMAZONUSER>
  DISCOURSE_SMTP_PASSWORD: <MYAMAZONPASS>
  DISCOURSE_SMTP_ENABLE_START_TLS: true
  DISCOURSE_SMTP_AUTHENTICATION: login

Did the FROM address change with:

- exec: rails r "SiteSetting.notification_email='talk@xyz.com'"
Changing the app.yml AND executing the command:

./launcher enter app
rails r "SiteSetting.notification_email = 'talk@xyz.com'"
exit

What I can see is it connects to SMTP server but is not able to send the email, but logs don’t say why.

Any help appreciated
Thanks

After changing app.yml did you perform a rebuild for changes to take effect?

Are you able to telnet into AWS SES from your server?

Yes. Every each try I did rebuild the app.
I can perform telnet without any problem.

Per log, connection is not an issue IMHO, but can’t figure what can be.

It could be permissions. We had to ask Amazon to open up SES before we could send to anyone via SES. Before we did that it was domain addresses only that were allowed.

Hi Keith

Yes. I’m aware about it.
In our amazon account we already have more than 30 domains allowed to send emails through SES and a very large email quota.

Using any other method to send it works. Only via discourse it throws that error

1 Like

I’m using Amazon SES and it work well.
You can try create new credential, set permission send from domain and check a gain.

First time, I also have problem with ses but when create new credential, it’s work well. Users also reply via email with no delay.

1 Like