This commit is contained in:
MeiMei 2018-11-30 00:35:17 +09:00 committed by syuilo
parent b56bf00612
commit e21b349680

View file

@ -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