Add SMTP transporter in helpers
This commit is contained in:
20
helpers/smtpTransporter.js
Normal file
20
helpers/smtpTransporter.js
Normal 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,
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user