-
Notifications
You must be signed in to change notification settings - Fork 189
Expand file tree
/
Copy pathapp.module.ts
More file actions
41 lines (37 loc) · 1.1 KB
/
app.module.ts
File metadata and controls
41 lines (37 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
require('dotenv').config();
import { Module } from '@nestjs/common';
import { MailerModule } from '@nestjs-modules/mailer';
import { HandlebarsAdapter } from '@nestjs-modules/mailer/adapters/handlebars.adapter';
import { AppController } from './app.controller';
import { AppService } from './app.service';
@Module({
imports: [
MailerModule.forRoot({
transport: {
host: 'smtp.office365.com',
port: 587,
tls: {
ciphers: 'SSLv3',
},
secure: false, // true for 465, false for other ports
auth: {
user: process.env.EMAIL_ID, // generated ethereal user
pass: process.env.EMAIL_PASS, // generated ethereal password
},
},
defaults: {
from: '"nest-modules" <user@outlook.com>', // outgoing email ID
},
template: {
dir: process.cwd() + '/template/',
adapter: new HandlebarsAdapter(), // or new PugAdapter() or new EjsAdapter()
options: {
strict: true,
},
},
}),
],
controllers: [AppController],
providers: [AppService],
})
export class AppModule {}