diff --git a/src/routes/sendInvite.ts b/src/routes/sendInvite.ts index 5ced487..8a178df 100644 --- a/src/routes/sendInvite.ts +++ b/src/routes/sendInvite.ts @@ -21,14 +21,18 @@ router.post("/", async (req, res) => { }); // send mail with defined transport object - await transporter.sendMail({ - from: "stream@graff.tech", // sender address - to: email, // list of receivers - subject: "Приглашение на демонстрацию - stream.graff.tech", // Subject line - html: `
+ try { + await transporter.sendMail({ + from: "stream@graff.tech", // sender address + to: email, // list of receivers + subject: "Приглашение на демонстрацию - stream.graff.tech", // Subject line + html: `
Ссылка для подключения к демонстрации: ${link}
`, - }); + }); + } catch (error) { + console.log("error", (error as Error).message); + } res.json({ ok: 1 }); });