Home > Blockchain >  nodemailer - can't send mail with rediffmail
nodemailer - can't send mail with rediffmail

Time:10-24

I'm trying to send mail from rediffmail using nodemailer Here's the code snippet

var transporter = nodemailer.createTransport({
  host: "smtp.rediffmail.com", // hostname
  port:25, secureConnection: false,
  secure: false,
  tls: {
    ciphers: "SSLv3",
  },
  auth: {
    user: process.env.MAILADDRESS,
    pass: process.env.MAILPASS,
  },
});

var mailOptions = {
    from: process.env.MAILADDRESS,
    to: email,
    subject: "Sending using Node.js",
    html: "<h1>hoohaa</h1>That was eafefesy!",
  };



transporter.sendMail(mailOptions, (err, info) => {
                    if (err) {
                      console.log(err);
                    } else {
                      console.log(
                        `Password recovery Email sent to ${email} : ${info.response}`
                      );
                    }}

and the error which I get is :

{ errno: -4039, code: 'ESOCKET', syscall: 'connect', address: '202.137.235.17', port: 25, command: 'CONN' }

CodePudding user response:

Maybe you could use smtp.gmail.com ?

CodePudding user response:

Remove the TLS. You're not using ssl so you don't need it.

  • Related