Hello, I really need help i have been going through this problem for days looking for a solution but yet no solution. I have been trying to send mails to my users in the server side using nodemailer with the email account i created on zoho but after it sends the request, after 30s all i ge tback is connection error, i have checked my configurations for it, all of them are correct i don't really know for sure where am wrong.. please I need help.. below are my settings..
let transporter = nodemailer.createTransport({
host: 'smtp.zoho.com',
port: 465,
secure: true, // use SSL
auth: {
pass: process.env.password
}
});
let mailOptions = {
from: 'myaccount',
to: 'somebody@gmail.com',
subject: 'Hello ✔',
text: 'Hello world?',
html: '<b>Hello world?</b>'
};
transporter.sendMail(mailOptions, (error, info) => {
if (error) {
return console.log(error);
}
console.log('sent message');
});
If i send the mail from my account dashboard it sends the mail perfectly i wouldn't know why nodemailer gives me connection timeout , pls i really need help