Commit 81ca33a6 authored by Internship UKSW 2019's avatar Internship UKSW 2019

Initial commit

parent 14593fd1
...@@ -8,10 +8,10 @@ app.use(bodyParser.json()) ...@@ -8,10 +8,10 @@ app.use(bodyParser.json())
app.use(bodyParser.urlencoded({ extended: true })) app.use(bodyParser.urlencoded({ extended: true }))
const sendEmail = (request, response) => { const sendEmail = (request, response) => {
const {subject, emailcc, emailsend, message} = request.body const {subject, emailcc, emailsend, messages} = request.body
nodemailer.createTestAccount((err, account) => { nodemailer.createTestAccount((err, account) => {
const htmlEmail = ` const htmlEmail = `
<p>${message}</p> <p>${messages}</p>
` `
let transporter = nodemailer.createTransport({ let transporter = nodemailer.createTransport({
// host: 'smtp.gmail.com', // host: 'smtp.gmail.com',
...@@ -42,7 +42,7 @@ const sendEmail = (request, response) => { ...@@ -42,7 +42,7 @@ const sendEmail = (request, response) => {
from: 'prastowo.nugroho.int@visionet.co.id',//'vdocmanagement@gmail.com' from: 'prastowo.nugroho.int@visionet.co.id',//'vdocmanagement@gmail.com'
cc: emailcc, cc: emailcc,
subject: subject, subject: subject,
text: "Hello World", text: messages,
html: htmlEmail html: htmlEmail
} }
mailOptions.to = to; mailOptions.to = to;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment