Commit c7753a8d authored by Internship UKSW 2019's avatar Internship UKSW 2019

Initial commit

parent 2140a672
...@@ -8,7 +8,7 @@ app.use(bodyParser.json()) ...@@ -8,7 +8,7 @@ app.use(bodyParser.json())
app.use(bodyParser.urlencoded({ extended: false })) app.use(bodyParser.urlencoded({ extended: false }))
const sendEmail = (request, response) => { const sendEmail = (request, response) => {
const {subject, name, email, message} = request.body const {subject, emailcc, emailsend, message} = request.body
nodemailer.createTestAccount((err, account) => { nodemailer.createTestAccount((err, account) => {
const htmlEmail = ` const htmlEmail = `
<p>${message}</p> <p>${message}</p>
...@@ -18,12 +18,16 @@ const sendEmail = (request, response) => { ...@@ -18,12 +18,16 @@ const sendEmail = (request, response) => {
auth: { auth: {
user: 'vdocmanagement@gmail.com', user: 'vdocmanagement@gmail.com',
pass: 'docmgmt123' pass: 'docmgmt123'
} },
port: 465,
secure: true,
proxy: '10.194.194.2'
}) })
let mailOptions = { let mailOptions = {
from: 'vdocmanagement@gmail.com', from: 'vdocmanagement@gmail.com',
to: email, to: emailsend,
cc: emailcc,
subject: subject, subject: subject,
text: message, text: message,
html: htmlEmail html: htmlEmail
......
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