Nodemailer not working with Zoho
Hi All,
I'm having issues with Zoho working with Nodemailer. It works as expected when using gmail as the service.
Below is the code I get when using zoho.
- Error sending email: Error: connect ECONNREFUSED 127.0.0.1:587
- at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1595:16) {
- errno: -61,
- code: 'ESOCKET',
- syscall: 'connect',
- address: '127.0.0.1',
- port: 587,
- command: 'CONN'
- }
This is the code for my Nodemailer Transport
Please let me know if you'd like to see more
const myEmail: string = env.EMAIL_ADDRESS;
const password: string = env.EMAIL_PASSWORD;
const transporter: Transporter<SentMessageInfo> = nodemailer.createTransport({
// service: "gmail",
service: "smtp.zoho.com",
port: 465,
secure: true,
auth: {
user: myEmail,
pass: password,
},
});