yads / nodemailer-express-handlebars

A plugin for nodemailer that uses express-handlebars view engine to generate emails
87 stars 30 forks source link

Unable to use custom extension for partials #60

Closed nazmirket closed 2 months ago

nazmirket commented 1 year ago

When I use a custom file extension with settings below

hbs({
        viewEngine: {
            extName: '.hbs',
            defaultLayout: false,
            partialsDir: PartialsDir,
        },
        viewPath: TemplateFolder,
        extName: '.hbs',
    })

My partials with .hbs extension are not resolved. I think custom extension should also be applied to partials.

For anyone who is having the same problem, just name your partials with .handlebars extension

yads commented 1 year ago

I believe this is an issue with express-handlebars. Please open an issue with that project.

rosselpha commented 1 year ago

i think this error is coming from nodemailer-express-handlebars----- Error: The partial header could not be found

yads commented 1 year ago

nodemailer-express-handlebars may be in the stack trace, but the error is coming from further down the toolchain. This extension does not configure partials. That is handled by your express-handlebars configuration which you either instantiate directly or pass as the optionset viewEngine.

On Mon, Mar 6, 2023, 8:33 PM rosselpha @.***> wrote:

i think this error is coming from nodemailer-express-handlebars----- Error: The partial header could not be found

— Reply to this email directly, view it on GitHub https://github.com/yads/nodemailer-express-handlebars/issues/60#issuecomment-1457460765, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEAYZZZFIWRV23EY7IHXKTW22UBRANCNFSM6AAAAAAVDUOUIM . You are receiving this because you commented.Message ID: @.***>