mirror of
https://github.com/MisskeyIO/misskey
synced 2024-12-01 00:08:24 +09:00
Fix SMTP (#3436)
This commit is contained in:
parent
89047fd66d
commit
683a85ecc0
@ -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 New Issue
Block a user