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