fix: Allow for offline development

This commit is contained in:
Tom Moor
2021-06-21 21:40:28 -07:00
parent ede7f2e3e6
commit 3cec6b4903

View File

@ -197,6 +197,8 @@ export class Mailer {
if (useTestEmailService) {
log("SMTP_USERNAME not provided, generating test account…");
try {
let testAccount = await nodemailer.createTestAccount();
const smtpConfig = {
@ -210,6 +212,9 @@ export class Mailer {
};
this.transporter = nodemailer.createTransport(smtpConfig);
} catch (err) {
log(`Could not generate test account: ${err.message}`);
}
}
}
}