Browse Source

Fixed small issue with contact form.

pull/33/head
jrtechs 6 years ago
parent
commit
1f14b3ebcf
1 changed files with 11 additions and 2 deletions
  1. +11
    -2
      includes/contact.js

+ 11
- 2
includes/contact.js View File

@ -100,12 +100,21 @@ const sendEmail = function(name, email, message)
} }
})); }));
const email_message_html = "<h2><b>email:</b> " + email + "</h2><br>" +
"<h2><b>name:</b> " + name + "</h2><br>" +
"<h2>message:</h2><br><p>" + message + "</p>";
const email_message_text = "email: " + email + "\n" +
"name: " + name + "\n" +
"message: \n" + message;
const mailOptions = const mailOptions =
{ {
to: config.DESTINATION_EMAIL, // list of receivers to: config.DESTINATION_EMAIL, // list of receivers
subject: "Jrtechs.net form submission", // Subject line 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 // send mail with defined transport object

Loading…
Cancel
Save