zepochs / nestjs-mailer

🌈 A simple implementation example with and without email-templates using mailer module for nest js built on top of nodemailer.
https://github.com/nest-modules/mailer
MIT License
121 stars 30 forks source link

My template is not loaded #37

Closed vladimirteddy closed 10 months ago

vladimirteddy commented 10 months ago

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"

denizsult commented 10 months ago

@vladimirteddy Hey! I'm facing the same problem as you. How did you solve it?