Please fill the following questionnaire about your issue:
[ ] Looking for help to resolve some kind of problem with Nodemailer
Are you listed as a sponsor of Nodemailer project (see Sponsors button above)?
[x] No. Unless it is a bug in Nodemailer you might find support from public forums like StackOverflow.
State your problem here:
Trying to send any email causes an error to throw. Using the example in the documentation throws it.
"use strict";
const nodemailer = require("nodemailer");
// async..await is not allowed in global scope, must use a wrapper
async function main() {
// Generate test SMTP service account from ethereal.email
// Only needed if you don't have a real mail account for testing
let testAccount = await nodemailer.createTestAccount();
// create reusable transporter object using the default SMTP transport
let transporter = nodemailer.createTransport({
host: "smtp.ethereal.email",
port: 587,
secure: false, // true for 465, false for other ports
auth: {
user: testAccount.user, // generated ethereal user
pass: testAccount.pass, // generated ethereal password
},
});
// send mail with defined transport object
let info = await transporter.sendMail({
from: '"Fred Foo 👻" <[email protected]>', // sender address
to: "[email protected], [email protected]", // list of receivers
subject: "Hello ✔", // Subject line
text: "Hello world?", // plain text body
html: "<b>Hello world?</b>", // html body
});
console.log("Message sent: %s", info.messageId);
// Message sent: <[email protected]>
// Preview only available when sending through an Ethereal account
console.log("Preview URL: %s", nodemailer.getTestMessageUrl(info));
// Preview URL: https://ethereal.email/message/WaQKMgKddxQDoou...
}
main().catch(console.error);
the result I get is
Error: Unexpected socket close
at Timeout._onTimeout (/home/nodemailer-test/node_modules/nodemailer/lib/smtp-transport/index.js:189:31)
at listOnTimeout (internal/timers.js:549:17)
at processTimers (internal/timers.js:492:7)
Also running into this. Would be nice if https://status.ethereal.email/ detected this sort of down time.
Also seeing this! Totally appreciate the free service though so not complaining—just confirming. Also I agree with @kiancross — it'd be great if the status page accurately reflected this type of issue.
i have de same error, and I was breaking my head to solve it until I came here
This should be resolved now. Somehow required disk mount stopped working.
Most helpful comment
This should be resolved now. Somehow required disk mount stopped working.