AWS SES SMTP on Docker

Describe the issue/error/question

I am trying to use AWS SES to send out user invites, but every combination of PORT + SSL I tried hasn’t worked.

These are the settings I’ve kept constant:

N8N_EMAIL_MODE=smtp
N8N_SMTP_HOST=email-smtp.us-east-1.amazonaws.com
N8N_SMTP_USER=<AWS KEY>
N8N_SMTP_PASS=<AWS SECRET>
N8N_SMTP_SENDER=<MY EMAIL ADDRESS>

and then I tried the following combinations of port and ssl

N8N_SMTP_PORT=465
N8N_SMTP_SSL=true
-
N8N_SMTP_PORT=465
N8N_SMTP_SSL=false
-
N8N_SMTP_PORT=587
N8N_SMTP_SSL=false
-
N8N_SMTP_PORT=587
N8N_SMTP_SSL=true

What is the error message (if any)?

I get the following errors for port/ssl combination:
465 / true: Failed to send email
465 / false: Greeting never received
587 / true: 140624640649152:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:…/deps/openssl/openssl/ssl/record/ssl3_record.c:332:
587 / false: Failed to send email

I’ve tried switching docker image from n8nio/n8n to n8nio/n8n:latest-debian after reading some answers on the forum, but to no avail.

Is there a way to see more detailed SMTP error messages to figure out why it fails?

Thanks.

Information on your n8n setup

  • n8n version: Docker image n8nio/n8n:latest-debian
  • Database you’re using (default: SQLite): SQLite
  • Running n8n with the execution process [own(default), main]: own
  • Running n8n via [Docker, npm, n8n.cloud, desktop app]: Docker

I was going to delete this topic now that I found out the problem, but maybe others will face the same issue.

The problem I was having is that my SES account was in Sandbox mode, which means I could only send emails to validated recipients, or to Amazon’s sandbox emails.

Just lost about 3-4h searching for a solution to a stupid error on my side :frowning:

1 Like

Hi @MarceloSchmidt, welcome to the community and thanks so much for sharing your solution (though I am very sorry for the time loss)!

Hey @MarceloSchmidt , may I know what SMTP port and SSL settings did you used to eventually get it to work?

Hey @jeremylwf

I used:

N8N_EMAIL_MODE = smtp
N8N_SMTP_HOST = email-smtp.us-east-1.amazonaws.com
N8N_SMTP_USER = AK**********ST
N8N_SMTP_PASS = ********
N8N_SMTP_SENDER = myemail@address
N8N_SMTP_PORT = 587
N8N_SMTP_SSL = false

Make sure you’re not in a sandbox.
Hope it helps.

1 Like