Add SMTP transporter in helpers

This commit is contained in:
2020-08-29 11:01:57 +02:00
parent 2b4832a4f7
commit a197ae9cc6
2 changed files with 28 additions and 3 deletions

View File

@@ -0,0 +1,20 @@
const nodemailer = require('nodemailer');
const {
smtpPool,
smtpHost,
smtpPort,
smtpUsername,
smtpPassword,
} = require('../config/config');
nodemailer.createTransport({
pool: smtpPool,
host: smtpHost,
port: smtpPort,
secure: smtpSecure,
auth: {
user: smtpUsername,
pass: smtpPassword,
},
});