Extract backend runtime configuration
This commit is contained in:
20
backend/services/mailer.js
Normal file
20
backend/services/mailer.js
Normal file
@@ -0,0 +1,20 @@
|
||||
const nodemailer = require('nodemailer');
|
||||
const { smtp } = require('../config/runtime');
|
||||
|
||||
const transporter = nodemailer.createTransport({
|
||||
host: smtp.host,
|
||||
port: smtp.port,
|
||||
secure: false,
|
||||
auth: {
|
||||
user: smtp.user,
|
||||
pass: smtp.pass,
|
||||
},
|
||||
tls: {
|
||||
ciphers: 'SSLv3',
|
||||
rejectUnauthorized: false
|
||||
},
|
||||
debug: smtp.debug,
|
||||
logger: smtp.debug
|
||||
});
|
||||
|
||||
module.exports = transporter;
|
||||
Reference in New Issue
Block a user