'woh to send a email in node js and express js by nodemailer

I want to send an email in experss project. Using nodemailer. But I get the following error { "errno": -4078, "code": "ECONNECTION", "syscall": "connect", "address": "127.0.0.1", "port": 25, "command": "CONN" }

The image below is related to the codes



Solution 1:[1]

I see that issue is occurring with your port number and also it occur with the sender you are using for it like sendgrid or sendinblue or gmail cause some of them are not supported localhost or http request and it also depends on what port are you using for that try to change that for mails you can use 465,524 also

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Karen Payne