nest-modules / mailer

📨 A mailer module for Nest framework (node.js)
https://nest-modules.github.io/mailer/
MIT License
846 stars 177 forks source link

Preview not working? #1138

Open mgs96 opened 7 months ago

mgs96 commented 7 months ago

Describe the bug Setting up preview: { open: true, } On the mailer module configuration doesn't open the browser showing the template.

Expected behavior Mail is displayed on the browser.

Screenshots Screenshot 2024-03-18 at 7 08 23 PM

This is how I'm calling the sendMail function: Screenshot 2024-03-18 at 7 11 16 PM

Desktop:

Additional context It was my understanding that if the preview: true was set up, the mail would not be sent, is this the case?

buti1021 commented 2 months ago

Running into the same issue on Windows

buti1021 commented 2 months ago
        MailerModule.forRoot({
            transport: {jsonTransport: true},
            preview: true,
        }),

this is my config, according to the code here the issues is, that templateAdapter is undefined (which is suiting my config, but in my understanding should not change that preview works. I guess the preview part should be moved out of this condition or be included in an else block https://github.com/nest-modules/mailer/blob/64d0597edd47bd6446ca3a64200917a65837dcd9/lib/mailer.service.ts#L29

buti1021 commented 1 week ago

@mgs96 I dont think this has been resolved? Could you leave this open please?