-
Notifications
You must be signed in to change notification settings - Fork 177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
My template is not loaded? #1081
Comments
I had the same issue, turns out it was due to the css-inline dependency throwing an error because of Google fonts in my template. The error is currently ignored in an empty try/catch block in the handlebars adapter, it should probably call the callback function and pass the error in the catch block instead. you can work around it by disabling inline css in the second argument of the handlebar adapter instantiation. |
Thanks for your suggest. I fixed it by loading the template manually. |
I also have this issue that the email is just empty without any exception or anything, and it used to work flawlessly before the 1.10 update. |
Thank you @amitailanciano |
FYI, the WASM version of |
My config in app.module.ts:
MailerModule.forRoot({ transport: { host: 'smtp.gmail.com', port: 587, ignoreTLS: false, secure: false, auth: { user: process.env.GMAIL_USER, pass: process.env.GMAIL_PASS, }, }, defaults: { from: '"No Reply" <info@xxxxxxx>', }, // preview: true, template: { dir: process.cwd() + '/src/templates/', adapter: new HandlebarsAdapter(), options: { strict: true, }, }, }),
My config in sendMail:
const sendMail = await this._mailerService.sendMail({ to: user.email, subject: "Confirm Your Email Address", context: { name: 'my name' }, template: 'my-template', });
My mail account receives mail but there is no template.
"@nestjs-modules/mailer": "^1.6.0"
"nodemailer": "^6.7.0"
The text was updated successfully, but these errors were encountered: