completionId: cgen-040e14ed51364aa2b5d2db140de3ef65
cgen-040e14ed51364aa2b5d2db140de3ef65
This commit is contained in:
parent
5a59e2cbed
commit
0751efb574
1 changed files with 18 additions and 0 deletions
|
|
@ -29,6 +29,24 @@ function getTransporter() {
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Verify connection immediately
|
||||||
|
transporter.verify((error, success) => {
|
||||||
|
if (error) {
|
||||||
|
console.error("[Email] SMTP connection verification failed:", {
|
||||||
|
host: smtpHost,
|
||||||
|
port: smtpPort,
|
||||||
|
user: smtpUser,
|
||||||
|
error: error?.message || String(error),
|
||||||
|
});
|
||||||
|
} else if (success) {
|
||||||
|
console.log("[Email] SMTP connection verified successfully", {
|
||||||
|
host: smtpHost,
|
||||||
|
port: smtpPort,
|
||||||
|
user: smtpUser,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
return transporter;
|
return transporter;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue