Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import path from 'path'
import nodemailer from 'nodemailer'
import EmailTemplates from 'swig-email-templates'
const templates = new EmailTemplates
({
root: path.join(__dirname, 'templates')
})
let transporter
if (configuration.mail_service.smtp)
{
// create reusable transporter object using the default SMTP transport
transporter = nodemailer.createTransport
({
// pool : true,
host : configuration.mail_service.smtp.host,
port : configuration.mail_service.smtp.port,
secure : configuration.mail_service.smtp.secure, // use SSL
auth: