Skip to content

Commit ceb9d98

Browse files
committed
adding verify on main
1 parent 04460d9 commit ceb9d98

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

utilities/mailer/index.mjs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,14 @@ export const sendMail = async (email, subject, message) => {
5959
port: process.env.SMTP_PORT,
6060
})
6161

62+
transporter.verify((error, success) => {
63+
if (error) {
64+
console.log("Error in SMTP configuration: ", error)
65+
return {status: 500, message: error.toString()}
66+
}
67+
console.log("Server is ready to take our messages")
68+
})
69+
6270
const mailOptions = {
6371
from: process.env.TPEN_SUPPORT_EMAIL,
6472
to: email,

0 commit comments

Comments
 (0)