mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-14 22:17:30 -07:00
Fix SMTP (#3436)
This commit is contained in:
parent
b56bf00612
commit
e21b349680
1 changed files with 4 additions and 2 deletions
|
@ -69,12 +69,14 @@ export default define(meta, (ps, user) => new Promise(async (res, rej) => {
|
|||
|
||||
const meta = await fetchMeta();
|
||||
|
||||
const enableAuth = meta.smtpUser != null && meta.smtpUser !== '';
|
||||
|
||||
const transporter = nodemailer.createTransport({
|
||||
host: meta.smtpHost,
|
||||
port: meta.smtpPort,
|
||||
secure: meta.smtpSecure,
|
||||
ignoreTLS: true,
|
||||
auth: meta.smtpUser != null ? {
|
||||
ignoreTLS: !enableAuth,
|
||||
auth: enableAuth ? {
|
||||
user: meta.smtpUser,
|
||||
pass: meta.smtpPass
|
||||
} : undefined
|
||||
|
|
Loading…
Reference in a new issue