Closed queejie closed 8 months ago
Node.js version: v16.20.0
OS version: MacOS Ventura 13.5.2 (22G91)
Description: Calls to email.send() never return or fire exception in dev mode, but email does get sent to browser.
Calls to email.send() never return or fire exception in dev mode, but email does get sent to browser.
Expect send() to either throw an exception or return a result. I turned debugging on via the environment variable, and no errors are reported there.
public async send() { try { const emailConfig: EmailTemplate.EmailConfig = { message: {from: this.config.from}, views: {root: this.config.templateDir + '/emails'}, send: true, subjectPrefix: this.env.opMode !== 'production' ? `[${this.env.opMode.toUpperCase()}] ` : false, }; emailConfig.transport = {sendmail: true}; const email: EmailTemplate = new Email(emailConfig); console.log('SEND...'); const result = await email.send({ template: this.config.template, message: {to: this.config.to}, locals: this.config.data }); console.log('AFTER'); // Never gets here return result; } catch (exception: any) { return (`Unable to send email. code=${exception.code}`); // Never gets here } }
Can you please create a GitHub repository with reproducible test case and then link it here?
Describe the bug
Node.js version: v16.20.0
OS version: MacOS Ventura 13.5.2 (22G91)
Description: Calls to email.send() never return or fire exception in dev mode, but email does get sent to browser.
Actual behavior
Calls to email.send() never return or fire exception in dev mode, but email does get sent to browser.
Expected behavior
Expect send() to either throw an exception or return a result. I turned debugging on via the environment variable, and no errors are reported there.
Code to reproduce
Checklist