diff --git a/Utils/sendEmail.js b/Utils/sendEmail.js index e31bd55..5eeaeda 100644 --- a/Utils/sendEmail.js +++ b/Utils/sendEmail.js @@ -32,12 +32,13 @@ const transporter = createTransport({ }); const sendEmail = async (options) => { - try { - await transporter.sendMail(options); - console.log("Email sent successfully"); - } catch (error) { - console.log(error); - } + transporter.sendMail(options, function (error, info) { + if (error) { + console.log("Error occurred:", error); + } else { + console.log("Email sent successfully:", info.response); + } + }); }; export default sendEmail;