From 786ef73ba8c72bcba6fbf1e0dd4f63d49aedf7bb Mon Sep 17 00:00:00 2001 From: PriyanshuValiya <147643182+PriyanshuValiya@users.noreply.github.com> Date: Thu, 24 Oct 2024 22:37:45 +0530 Subject: [PATCH] Update contact.controller.js --- backend/controller/contact.controller.js | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/backend/controller/contact.controller.js b/backend/controller/contact.controller.js index bdf7dda..792a933 100644 --- a/backend/controller/contact.controller.js +++ b/backend/controller/contact.controller.js @@ -57,15 +57,7 @@ const createContactUs = async (req, res) => { }; // Send mail with defined transport object - await new Promise((resolve, reject) => { - transporter.sendMail(mailOptions, (error, info) => { - if (error) { - console.error("Error occurred: " + error.message); - reject(error); - } - resolve(info); - }); - }); + await transporter.sendMail(mailOptions); res.status(200).json({ status: "success",