improve email preview
This commit is contained in:
@@ -23,10 +23,22 @@ module.exports = {
|
||||
sendEmal: function (name, fromEmail, message, toEmail) {
|
||||
return new Promise ((resolve, reject) => {
|
||||
let messageBody =
|
||||
'Hello. User ' +
|
||||
'Hello. User left you a message on Saburly service using Alexa skill. \r\nMessage : ' +
|
||||
message +
|
||||
'\r\nName : ' +
|
||||
name +
|
||||
' left you a message on Saburly service using Alexa. Content of the message : ' +
|
||||
message;
|
||||
'\r\nEmail : ' +
|
||||
fromEmail +
|
||||
'\r\nYour Saburly team';
|
||||
|
||||
let messageBodyHTML =
|
||||
'<p>Hello. User left you a message on Saburly service using Alexa skill.</p><br/><b>Message : </b><br/><p>' +
|
||||
message +
|
||||
'</p><br/><p>Name : ' +
|
||||
name +
|
||||
'</p><br/><p>Email : ' +
|
||||
fromEmail +
|
||||
'</p><br/><b>Your Saburly team</b>';
|
||||
|
||||
let transporter = nodemailer.createTransport ({
|
||||
host: 'smtp.mail.com',
|
||||
@@ -39,11 +51,12 @@ module.exports = {
|
||||
});
|
||||
|
||||
var mailOptions = {
|
||||
from: fromEmail,
|
||||
from: 'saburly@mail.com',
|
||||
replyTo: fromEmail,
|
||||
to: toEmail,
|
||||
subject: 'Message from Saburly service',
|
||||
text: messageBody,
|
||||
html: messageBodyHTML
|
||||
};
|
||||
|
||||
transporter.sendMail (mailOptions, (error, info) => {
|
||||
|
||||
Reference in New Issue
Block a user