backend/helpers/smtpTransporter.js
2020-08-29 14:30:27 +02:00

26 lines
428 B
JavaScript

const nodemailer = require('nodemailer');
const {
smtpPool,
smtpHost,
smtpPort,
smtpUsername,
smtpPassword,
smtpSecure,
smtpRequireTLS,
} = require('../config/config');
const smtpTransporter = nodemailer.createTransport({
pool: smtpPool,
host: smtpHost,
port: smtpPort,
requireTLS: smtpRequireTLS,
secure: smtpSecure,
auth: {
user: smtpUsername,
pass: smtpPassword,
},
});
module.exports = smtpTransporter;