problem on ses configuration parameters

0

I am carrying out tests to put my Angular/nodejs/mysql web application into production which I have deployed on AWS using the free 750 hour monthly plan. I am part of a voluntary association and I created the web application to manage the association's activities.

Thanks in advance to anyone who can support me. I verified the domain "bandieragiallarovigo-odv.it" I set the configuration parameters that were assigned to me on the config.json file

the name of the host assigned for sending email through the SES service is: email-smtp.eu-north-1.amazonaws.com

I put the parameters in the config.json file.

I tried to send the email using POSTMAN and I can't send the email. I tried to analyze the PM2 logs and I saw that it reported that the smtp host is not email-smtp.eu-north-1.amazonaws.com, but rather "email-smtp.eu-south-1. amazonaws.com" which I don't know where it is retrieved from. Attached is the screenshot showing the error.

How can I overcome this problem?

Errore send email

| Error: getaddrinfo ENOTFOUND email-smtp.eu-south-1.amazonaws.com 8|Rovigo-odv | at GetAddrInfoReqWrap.onlookupall [as oncomplete] (node:dns:119:26) { 8|Rovigo-odv | errno: -3007, 8|Rovigo-odv | code: 'EDNS', 8|Rovigo-odv | syscall: 'getaddrinfo', 8|Rovigo-odv | hostname: 'email-smtp.eu-south-1.amazonaws.com', 8|Rovigo-odv | command: 'CONN'

PS I was able to send emails outside the sendbox since we are a non-profit voluntary association and we send a limited number of emails and never massive ones

moreno
asked 4 months ago95 views
1 Answer
0

Moreno,

It looks like there's a mismatch in the SMTP server settings in your configuration. The error suggests that your application is trying to connect to email-smtp.eu-south-1.amazonaws.com, which is for the Europe (Milan) region, but you mentioned that your SES service is configured for the Europe (Stockholm) region with the endpoint email-smtp.eu-north-1.amazonaws.com.

Here's what you can do to resolve the issue:

  1. Double-check your config.json file to ensure that the SMTP endpoint is correctly set to email-smtp.eu-north-1.amazonaws.com.
  2. Verify that there aren't any environment variables or other configuration files that might be overriding the SMTP settings when your application runs.
  3. If you are using version control, make sure the correct config file is checked in and that your deployment process is pulling the correct version.
  4. Ensure that the SMTP credentials (username and password) are for the eu-north-1 region and not mistakenly for eu-south-1.

If you still can't find where the incorrect endpoint is coming from, you might want to search through your entire codebase for the string email-smtp.eu-south-1.amazonaws.com to find where it's being set or used. You could also consider adding logging to your application to print out the configuration upon startup, which can help you identify where the incorrect setting is coming from.

Hope this helps!

profile picture
answered 4 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions