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

Initial commit

parent 81ca33a6
...@@ -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, messages} = request.body const {subject, emailcc, emailsend, message} = request.body
nodemailer.createTestAccount((err, account) => { nodemailer.createTestAccount((err, account) => {
const htmlEmail = ` const htmlEmail = `
<p>${messages}</p> <p>${message}</p>
` `
let transporter = nodemailer.createTransport({ let transporter = nodemailer.createTransport({
// host: 'smtp.gmail.com', // host: 'smtp.gmail.com',
...@@ -26,6 +26,7 @@ const sendEmail = (request, response) => { ...@@ -26,6 +26,7 @@ const sendEmail = (request, response) => {
tls: { tls: {
rejectUnauthorized: false rejectUnauthorized: false
}, },
proxy: 'http://10.194.194.2:8080'
// debug: true // debug: true
// auth: { // auth: {
// user: 'vdocmanagement@gmail.com', // user: 'vdocmanagement@gmail.com',
...@@ -42,7 +43,7 @@ const sendEmail = (request, response) => { ...@@ -42,7 +43,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: messages, text: message,
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