Add official @nestjs/mail module
See original GitHub issueFeature Request
Nest.js should have a mail module that provides an integration for nodemailer/email-templates. There are already third-party solutions available, for example:
- https://github.com/nest-modules/mailer (depends on nodemailer)
- https://github.com/toondaey/nestjs-mailer (depends on email-templates)
However, I suggest to provide an official solution like other major web frameworks (Laravel, Ruby on Rails or Spring Boot), as most business cases require mail services (e.g. password reset, notifications).
Describe the solution you’d like
@Module({
imports: [
MailModule.forRootAsync({
useFactory: () => ({
transport: 'smtps://user@example.com:password@mail.example.com',
defaults: {
from: 'Example <noreply@example.com>',
},
template: {
dir: __dirname + '/templates',
...
},
}),
}),
],
})
export class AppModule {}
Issue Analytics
- State:
- Created 3 years ago
- Reactions:28
- Comments:16 (5 by maintainers)
Top Results From Across the Web
How to use? · NestJS - Mailer - GitHub Pages
Check this documentation for how to use @nestjs-modules/mailer . Install. yarn add @nestjs-modules/mailer nodemailer #or npm install --save ...
Read more >Part-1 Email Sending In NestJS Application - Tech Seeker
Go to SendGrid's official website at 'https://sendgrid.com'. Next, do signup. ... npm install --save @nestjs-modules/mailer nodemailer ...
Read more >Sending email with SendGrid in NestJS - DEV Community
To use SendGrid in NestJS project, we simply use official mailer module from NestJS (https://github.com/nest-modules/mailer).
Read more >Developers - Add official @nestjs/mail module - - Bountysource
Nest.js should have a mail module that provides an integration for nodemailer/email-templates. There are already third-party solutions available, ...
Read more >NestJS Nodemailer Example with Handlebars & Sendgrid ...
1 – Installation of Packages for NestJS Nodemailer · 2 – NestJS Nodemailer Module Configuration · 3 – NestJS Handlebar Email Template ·...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Because it adds to the maintenance overhead with little advantage to the framework and it really isn’t necessary that the Nest team do it all.
Scott
I completely agree with @jmcdo29 and also have a https://github.com/nestjs/nest/issues/5148#issuecomment-664003442 as well. You can just create your own module with advantage of any customization you want, so you don’t face any restriction or limitation from the framework itself. For me I like creating my own wrapper module as much as I like without worry any compatibility as long as you follow the Nest Module document.