You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

26 lines
666 B

import { HandlebarsAdapter, MailerModule } from '@nest-modules/mailer'
import { Module } from '@nestjs/common'
import { join } from 'path'
import { mailTransportConfig } from './mail.config'
import { MailService } from './mail.service'
@Module({
imports: [
MailerModule.forRoot({
transport: mailTransportConfig,
defaults: {
from: `No Reply ${process.env.MAIL_FROM}`,
},
template: {
dir: join(__dirname, 'templates'),
adapter: new HandlebarsAdapter(),
options: {
strict: true,
},
},
}),
],
providers: [MailService],
exports: [MailService],
})
export class MailModule {}