| Conditions | 1 |
| Total Lines | 17 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | import { createTransport } from "nodemailer"; |
||
| 5 | |||
| 6 | export function createEmail(): Email { |
||
| 7 | return new Email({ |
||
| 8 | send: isProduction(), |
||
| 9 | message: { |
||
| 10 | from: process.env.EMAIL_FROM, |
||
| 11 | }, |
||
| 12 | transport: createTransport({ |
||
| 13 | host: process.env.EMAIL_HOST, |
||
| 14 | port: Number(process.env.EMAIL_PORT), |
||
| 15 | auth: { |
||
| 16 | user: process.env.EMAIL_USERNAME, |
||
| 17 | pass: process.env.EMAIL_PASSWORD, |
||
| 18 | }, |
||
| 19 | }), |
||
| 20 | getPath: (type, template) => { |
||
| 21 | return path.join(__dirname, "../emails", template, type); |
||
| 22 | }, |
||
| 25 |