Issue with Sending emails using SES: Timeout

The error message you’re encountering, “connect ETIMEDOUT 35.158.187.131:443”, indicates that your local development environment is unable to establish a connection with the SES endpoint at https://email-smtp.eu-central-1.amazonaws.com .

Configure the AWS CLI with your credentials using aws configure.

Try running aws ses list-identities from your terminal. If this works, it suggests the issue might be specific to your local development setup.

If you’re using an EC2 instance for local development, ensure the security group allows outbound traffic on port 443 to the SES endpoint in the EU Central-1 (eu-central-1) region.

Double-check your Nodemailer configuration, especially the amazon property. It should point to the correct SES endpoint for your region:

  • https://email-smtp.eu-central-1.amazonaws.com for EU Central-1
  • Use the appropriate endpoint URL for your region if it’s different.