Kalle Kuhlmann
Kalle Kuhlmann
Explore posts from servers
DDeno
Created by Kalle Kuhlmann on 11/1/2024 in #help
Nodemailer fails with Client network socket disconnected before... even locally
Hey, I am trying to use 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: {
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: {
pass: "K9S6HKVEg8bDtVNnnr",
},
logger: true,
});

return transporter.verify();
}

testMail();
This fails with 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
4 replies
DDeno
Created by Kalle Kuhlmann on 9/30/2024 in #help
Handle import "npm:..." prefix on generated code
Hey 👋 I have a file that is generated from a graphql schema, which has an import at the top not using the "npm:" prefix. As it is auto generated I can not change this from "graphql" to "npm:graphql" easily. Is there any work arround, to still use the file? Best, Kalle
3 replies