code fix and improvements
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
const nodemailer = require ('nodemailer');
|
||||
const emailConfig = require('../config/email');
|
||||
|
||||
module.exports = {
|
||||
transformEmailFromAlexaResponse: function (email) {
|
||||
@@ -43,23 +44,20 @@ module.exports = {
|
||||
name +
|
||||
'<br/><b>Email : </b>' +
|
||||
fromEmail +
|
||||
'<br/><b>Your Saburly team</b>';
|
||||
'<br/><br/><b>Your Saburly team</b>';
|
||||
|
||||
let transporter = nodemailer.createTransport ({
|
||||
host: 'smtp.mail.com',
|
||||
port: 587,
|
||||
secure: false,
|
||||
auth: {
|
||||
user: 'saburly@mail.com',
|
||||
pass: 'KeepSaburly',
|
||||
},
|
||||
host: emailConfig.SMTP_HOST,
|
||||
port: emailConfig.PORT,
|
||||
secure: emailConfig.SECURE,
|
||||
auth: emailConfig.AUTH,
|
||||
});
|
||||
|
||||
var mailOptions = {
|
||||
from: 'saburly@mail.com',
|
||||
from: emailConfig.FROM_EMAIL,
|
||||
replyTo: fromEmail,
|
||||
to: toEmail,
|
||||
subject: 'Message from Saburly service',
|
||||
subject: emailConfig.SUBJECT,
|
||||
text: messageBody,
|
||||
html: messageBodyHTML,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user