diff --git a/includes/contact.js b/includes/contact.js index 9c2e154..05099fe 100644 --- a/includes/contact.js +++ b/includes/contact.js @@ -100,12 +100,21 @@ const sendEmail = function(name, email, message) } })); + const email_message_html = "

email: " + email + "


" + + "

name: " + name + "


" + + "

message:


" + message + "

"; + + const email_message_text = "email: " + email + "\n" + + "name: " + name + "\n" + + "message: \n" + message; + + const mailOptions = { to: config.DESTINATION_EMAIL, // list of receivers subject: "Jrtechs.net form submission", // Subject line - text: message, // plaintext body - html: message + text: email_message_text, // plaintext body + html: email_message_html }; // send mail with defined transport object