User invites are not sent via SES

Describe the problem/error/question

When I am creating a new user, invite is not sent

What is the error message (if any)?

Mail command failed: 530 Authentication required

Information on your n8n setup

  • n8n version:
  • Database (default: SQLite): SQLite
  • n8n EXECUTIONS_PROCESS setting (default: own, main): own
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker

Env variables are set as follows:
N8N_EMAIL_MODE = smtp
N8N_SMTP_HOST = email-smtp.eu-cental-1.amazonaws.com
N8N_SMTP_USER = AK**********
N8N_SMTP_PASS = ********
N8N_SMTP_SENDER = my@mail
N8N_SMTP_PORT = 587
N8N_SMTP_SSL = false

Credentials are correct - I can send the e-mail via Bash/Openssl using the same data via the following script (sensitive variables are truncated):

# Create temporary file for the email
EMAIL_FILE=$(mktemp)

# Create a simple email message
cat > "$EMAIL_FILE" << EOF
From: $FROM_EMAIL
To: $TO_EMAIL
Subject: $SUBJECT
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit

$MESSAGE
EOF

# Send email using OpenSSL directly
echo "Sending email from $FROM_EMAIL to $TO_EMAIL"

# Use OpenSSL to communicate with the SMTP server
{
  sleep 1
  echo "EHLO localhost"
  sleep 1
  echo "STARTTLS"
  sleep 1
} | openssl s_client -connect $SMTP_HOST:$SMTP_PORT -starttls smtp -crlf 2>/dev/null

{
  echo "EHLO localhost"
  sleep 1
  echo "AUTH LOGIN"
  sleep 1
  echo $(echo -n "$USERNAME" | base64)
  sleep 1
  echo $(echo -n "$PASSWORD" | base64)
  sleep 1
  echo "MAIL FROM: <$FROM_EMAIL>"
  sleep 1
  echo "RCPT TO: <$TO_EMAIL>"
  sleep 1
  echo "DATA"
  sleep 1
  cat "$EMAIL_FILE"
  echo -e "\r\n.\r"
  sleep 1
  echo "QUIT"
} | openssl s_client -connect $SMTP_HOST:$SMTP_PORT -starttls smtp -crlf 2>/dev/null

EXIT_CODE=$?
if [[ $EXIT_CODE -eq 0 ]]; then
  echo "Email sent successfully!"
else
  echo "Failed to send email. Check your credentials and connection."
  exit 1
fi

# Clean up temporary file
rm -f "$EMAIL_FILE"

Hi, Mr. mykhailo
have you set up the inbound and outbound role for the SMTP protocol
like it running on the 587 port so you have to allow that port into your instance security group
let me know if need any further assistant

Inbound rules explicitly allow port 587 from anywhere, outbound traffic is not limited at all.
Basically, network-wise we are fine, as we are getting an answer from SES.

Still not solved

Hi, not sure but in the first example you are not using SSL in the bash script you are. might be the problem. In many 530 SES Auth problems online which show AWS config. TLS is set to mandatory