Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
I
Internship-uksw-2019 api-document-management
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Internship UKSW 2019
Internship-uksw-2019 api-document-management
Commits
34b9090a
Commit
34b9090a
authored
Apr 06, 2020
by
Internship UKSW 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Initial commit
parent
81ca33a6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
API.js
routes/API.js
+4
-3
No files found.
routes/API.js
View file @
34b9090a
...
@@ -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
s
}
=
request
.
body
const
{
subject
,
emailcc
,
emailsend
,
message
}
=
request
.
body
nodemailer
.
createTestAccount
((
err
,
account
)
=>
{
nodemailer
.
createTestAccount
((
err
,
account
)
=>
{
const
htmlEmail
=
`
const
htmlEmail
=
`
<p>
${
message
s
}
</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
:
message
s
,
text
:
message
,
html
:
htmlEmail
html
:
htmlEmail
}
}
mailOptions
.
to
=
to
;
mailOptions
.
to
=
to
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment