Add SMTP transporter in helpers

This commit is contained in:
ruihildt committed 2020-08-29 11:01:57 +02:00
1 parent 2b4832a4f7
commit a197ae9cc6
2 files changed
+28 -3

No files matched your search

+20
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,
},
});