18 lines
444 B
TypeScript
18 lines
444 B
TypeScript
|
import * as nodemailer from 'nodemailer';
|
||
|
|
||
|
export const emailProviders = [
|
||
|
{
|
||
|
provide: 'EMAIL_TRANSPORT',
|
||
|
useFactory: async () =>
|
||
|
nodemailer.createTransport({
|
||
|
host: process.env.SMTP_HOST,
|
||
|
port: parseInt(process.env.SMTP_PORT, 10) || 587,
|
||
|
secure: process.env.SMTP_SECURE === 'true',
|
||
|
auth: {
|
||
|
user: process.env.SMTP_USER,
|
||
|
pass: process.env.SMTP_PASS,
|
||
|
},
|
||
|
}),
|
||
|
},
|
||
|
];
|