Skip to content
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

lib/mailer.service.ts#L23 private to public? #1171

Open
junxiaotan opened this issue Apr 28, 2024 · 3 comments
Open

lib/mailer.service.ts#L23 private to public? #1171

junxiaotan opened this issue Apr 28, 2024 · 3 comments

Comments

@junxiaotan
Copy link

内部一些privaite属性,建议改为public,例如 transports,我想通过这个实现如果已有就不再xxxx。

@juandav
Copy link
Member

juandav commented Apr 30, 2024

Maybe I can implement a function to get the transports, what do you think?

I'm open to suggestions

@junxiaotan
Copy link
Author

Sure! as long as it can be exposed, it's good

@yusufkandemir
Copy link

We need a way to access the transports to be able to use Nodemailer plugins by doing transport.use('compile', plugin). I see two ways of doing this:

  1. expose the transports
  2. accept a list of plugins to add:
{
  /** whether to add the plugin before or after the template compilation plugin */
  position: 'append' | 'prepend';
  /** First parameter to be used in transport.use(step, plugin) */
  step: 'compile' | 'stream';
  plugin: import('nodemailer/lib/mailer').PluginFunction;
}[]

Also, both can be done at the same time. This would make it easier to add plugins via configuration and allow other advanced use cases by directly accessing the transports.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants