DenoDDeno
Powered by
Kalle KuhlmannK
Denoβ€’17mo agoβ€’
3 replies
Kalle Kuhlmann

Nodemailer fails with Client network socket disconnected before... even locally

Hey,

I am trying to use
nodemailer
nodemailer
within deno (2.0.4), and I am unable to figure out why it doesn't work.

I made a minimal example (ethereal credentials specifically for this example):
import nodemailer from 'npm:nodemailer';

const testMail = async () => {
  const transporter = nodemailer.createTransport({
    host: "smtp.ethereal.email",
    port: 587,
    secure: false, // Use `true` for port 465, `false` for all other ports
    auth: {
      user: "tess3@ethereal.email",
      pass: "K9S6HKVEg8bDtVNnnr",
    },
    logger: true,
  });

  return transporter.verify();
}

testMail();
import nodemailer from 'npm:nodemailer';

const testMail = async () => {
  const transporter = nodemailer.createTransport({
    host: "smtp.ethereal.email",
    port: 587,
    secure: false, // Use `true` for port 465, `false` for all other ports
    auth: {
      user: "tess3@ethereal.email",
      pass: "K9S6HKVEg8bDtVNnnr",
    },
    logger: true,
  });

  return transporter.verify();
}

testMail();


This fails with
Client network socket disconnected before secure TLS connection 
was established
Client network socket disconnected before secure TLS connection 
was established
independent of the "secure" setting. If I run this same snipped with node, there is no problem.

Does somebody have an idea?

Best,
Kalle
Deno banner
DenoJoin
Chat about Deno, a modern runtime for JavaScript and TypeScript.
20,934Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

Installing packages locally with Deno
fcrozatierFfcrozatier / help
15mo ago
Building next with deno fails with error
psbakrePpsbakre / help
17mo ago