Commit 90d53805 authored by Internship UKSW 2019's avatar Internship UKSW 2019

Initial commit

parents 9770f8b4 0cac4453
......@@ -15,22 +15,28 @@ const sendEmail = (request, response) => {
`
let transporter = nodemailer.createTransport({
host: 'smtp.gmail.com',
port: 465,
secure: true,
auth: {
user: 'vdocmanagement@gmail.com',
pass: 'docmgmt123'
},
//proxy: 'http://10.194.194.2:8080'
// proxy: 'http://10.194.194.2:8080'
})
let maillist = [
emailsend
]
maillist.forEach(function (to, i, array) {
let mailOptions = {
from: 'vdocmanagement@gmail.com',
to: emailsend,
cc: emailcc,
subject: subject,
text: message,
html: htmlEmail
}
mailOptions.to = to;
transporter.sendMail(mailOptions, (error, info) => {
if (err) {
throw error
......@@ -40,6 +46,7 @@ const sendEmail = (request, response) => {
response.status(200).json({ status: 'success', message: 'Email has been sent' })
})
})
})
}
const getDocument = (request, response) => {
......
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