Skip to content

Commit 16a3248

Browse files
committed
500 when email not work
1 parent face7bb commit 16a3248

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

backend/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -132,12 +132,12 @@ If you did not request this, please ignore this email.`,
132132
transporter.sendMail(mailOptions, (err) => {
133133
if (err) {
134134
console.error("There was an error: ", err);
135+
res.status(500).send("Failed to send email");
135136
} else {
136137
console.log("Email sent");
138+
res.send("Check your email for a confirmation link");
137139
}
138140
});
139-
140-
res.send("Check your email for a confirmation link");
141141
});
142142

143143
app.get("/confirm/:token", async (req, res) => {

0 commit comments

Comments
 (0)