Iam trying to send node mailer using webmail instead of GMail using smtp sever as follows..
// config connections
"nodemailer" : {
"host": "smtp.in-sciencelabs.com",
"port": 587,
"auth": {
"user": "myuser.com",
"pass": "myp@ssword"
}
// in nodemailer.js code iam importing the config details....
const transporter=
nodemailer.createTransport(smtpTransport((config["nodemailer"])));
var mailOptions = {
from: `${config["nodemailer"]["user"]}`,
to: tomail,
subject: subject ,
text: data
};
transporter.verify(function(error, success) {
if (error) {
console.log(error,"17");
} else {
console.log("Server is ready to take our messages");
}
});
i tried to verify the connections so its shows an error like this
(Error: connect ETIMEDOUT)***.**.***.***:587
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1146:16) {
errno: -4039,
code: 'ECONNECTION',
syscall: 'connect',
address: 'xxx.xx.xxx.xxx',
port: 587,
command: 'CONN'
}
here iam trying this but its not workout for me but in another system emails are sending so i dont know which setting is going to change in system for sending an email could you please help me out from this problem and i also changed the node version to 12.18.3