Mailer settings on local machine

Hi,

I’ve created a form in a modal that collects user info and registers them.

On register SUBMIT, the data is sent to the DB but the Send Mail element is failing. From what I can tell from the error below, the connection to SMTP is being refused.

{"status":"500","code":"ESOCKET","message":"connect ECONNREFUSED 127.0.0.1:465","stack":"Error: connect ECONNREFUSED 127.0.0.1:465\n at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1146:16)"}

Should I connect to Sendgrid or Elasticmail from a local node development or is this not possible? What is the best practice for working locally with SMTP? :confounded:

Thanks

What is your local server? Does it have SMTP running on it? That will determine the best way forward. You can always use a third-party mailer like Sendgrid or even mail servers like Gmail if you have an account.

Hi, thanks for the response. I’m not actually using a local server to send the mail. I’ve attempted to use both Sendgrid and Elasticmail.

I notice in the error its attempting to use 127.0.0.1:465 I would have assumed it be smtp.sendgrid.net:465 if it’s using sendgrid

:white_check_mark: Resolved.

The setup mailer properties were not holding the host details on save. Even though I was saving the mail.json file. I had to restart Wappler and re-save the mail.json file.

3 Likes