1

I want to check if a batch of email(gmail) address is valid and I didn't want to pay for a service. I tried openssl s_client but it keeps on renegotiating and failing and the documentation is too poor for me to resolve it.

RENEGOTIATING
3C690000:error:0A00010A:SSL routines:can_renegotiate:wrong ssl version:ssl\ssl_lib.c:2305:

Then I tried nodeMailer with nodejs on gmail, it worked. But the gmail SMTP server accepted invalid addresses(catch-all?) and even sent a blank email to the recipient with no data. Email verification does work on many paid serve https://email-checker.net/. I have no idea how those paid services work. I looked for forums, discussions and other resources online but I wasn't able to find any. Last thread on this was like 9 years ago.

import nodemailer from 'nodemailer'
const transporter = nodemailer.createTransport({
    host: "smtp.gmail.com",
    port: 465,
    auth: {
      user: 'example@gmail.com',
      pass: 'passcode'
    }
});
function mailer(){
  const mailOptions = {
    from: 'example@gmail.com',
    to: 'recipient@gmail.com',
    // subject: 'Test Email',
    // text: 'This is a test email.'
  };
  transporter.sendMail(mailOptions, function(error, info) {
    if (error) {
      console.log(error);
    } else {
      console.log('Log: ' + info.response);
    }
  });
    
}
NG42
  • 11
  • 1
  • 1
    For reference: [How do I check if an email address is valid without sending anything to it?](https://stackoverflow.com/questions/3024819/how-do-i-check-if-an-email-address-is-valid-without-sending-anything-to-it?answertab=modifieddesc#tab-top) – showdev Jun 02 '23 at 07:03

0 Answers0