Commit 34b9090a authored by Internship UKSW 2019's avatar Internship UKSW 2019

Initial commit

parent 81ca33a6
......@@ -8,10 +8,10 @@ app.use(bodyParser.json())
app.use(bodyParser.urlencoded({ extended: true }))
const sendEmail = (request, response) => {
const {subject, emailcc, emailsend, messages} = request.body
const {subject, emailcc, emailsend, message} = request.body
nodemailer.createTestAccount((err, account) => {
const htmlEmail = `
<p>${messages}</p>
<p>${message}</p>
`
let transporter = nodemailer.createTransport({
// host: 'smtp.gmail.com',
......@@ -26,6 +26,7 @@ const sendEmail = (request, response) => {
tls: {
rejectUnauthorized: false
},
proxy: 'http://10.194.194.2:8080'
// debug: true
// auth: {
// user: 'vdocmanagement@gmail.com',
......@@ -42,7 +43,7 @@ const sendEmail = (request, response) => {
from: 'prastowo.nugroho.int@visionet.co.id',//'vdocmanagement@gmail.com'
cc: emailcc,
subject: subject,
text: messages,
text: message,
html: htmlEmail
}
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