Update Utils/sendEmail.js

This commit is contained in:
gitadmin 2025-04-29 03:57:09 +00:00
parent cfcf990d36
commit d822aca57d

View File

@ -32,12 +32,13 @@ const transporter = createTransport({
}); });
const sendEmail = async (options) => { const sendEmail = async (options) => {
try { transporter.sendMail(options, function (error, info) {
await transporter.sendMail(options); if (error) {
console.log("Email sent successfully"); console.log("Error occurred:", error);
} catch (error) { } else {
console.log(error); console.log("Email sent successfully:", info.response);
} }
});
}; };
export default sendEmail; export default sendEmail;