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

PugAdapter not available for '@nestjs-modules/mailer' #5

Closed Emex4gman closed 4 years ago

Emex4gman commented 4 years ago

I tried to use the PugAdapter from '@nestjs-modules/mailer',

But I get this error

Module '"../node_modules/@nestjs-modules/mailer"' has no exported member 'PugAdapter'.

Emex4gman commented 4 years ago

To use PugAdapter use

import { PugAdapter } from '@nestjs-modules/mailer/dist/adapters/pug.adapter';

https://nest-modules.github.io/mailer/docs/mailer.html

matheus-vieira commented 4 years ago

I tried to use the HandlebarsAdapter from '@nestjs-modules/mailer',

But I get this error

Module '"../node_modules/@nestjs-modules/mailer"' has no exported member 'HandlebarsAdapter'.

To resolve I used

import { HandlebarsAdapter } from '@nestjs-modules/mailer/dist/adapters/handlebars.adapter';

Would be more cleaner to user some like, if possible:

import { HandlebarsAdapter } from '@nestjs-modules/mailer/adapter';

or even, if the plugins is available

import { HandlebarsAdapter } from '@nestjs-modules/mailer';

Emex4gman commented 4 years ago

I tried to use the HandlebarsAdapter from '@nestjs-modules/mailer',

But I get this error

Module '"../node_modules/@nestjs-modules/mailer"' has no exported member 'HandlebarsAdapter'.

To resolve I used

import { HandlebarsAdapter } from '@nestjs-modules/mailer/dist/adapters/handlebars.adapter';

Would be more cleaner to user some like, if possible:

import { HandlebarsAdapter } from '@nestjs-modules/mailer/adapter';

or even, if the plugins is available

import { HandlebarsAdapter } from '@nestjs-modules/mailer';

Sadly you have to dive deeper to each adapter. But you right though. It would be cleaner to use that approach