Проблемы с Nodemailer
Я создал аккаунт на etheral email, когда я запускаю этот код
const nodemailer = require('nodemailer')
async function main() {
let transporter = nodemailer.createTransport({
host: 'smtp.ethereal.email',
port: 465,
secure: true,
auth: {
user: '[email protected]',
pass: 'Tsj3vm3F7KGEaVUuVp'
},
});
await transporter.sendMail({
from: '"Node js" <[email protected]>',
to: "<[email protected]>",
subject: "Hello ✔",
text: "Hello world?",
html: "<b>Hello world?</b>",
});
}
main()
через несколько секунд вываливается несколько ошибок
(node:14944) UnhandledPromiseRejectionWarning: Error: read ECONNRESET
at TLSWrap.onStreamRead (internal/stream_base_commons.js:205:27)
(node:14944) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch blo
ck, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejec tions=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:14944) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the No
de.js process with a non-zero exit code.