Update Utils/sendEmail.js
This commit is contained in:
parent
cfcf990d36
commit
d822aca57d
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user