Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
PMRMS Notif
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ghitha Dinan
PMRMS Notif
Commits
48a63035
Commit
48a63035
authored
Jan 12, 2022
by
Ghitha Dinan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
typo
parent
721155b8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
EmailController.kt
...emenag/madrasah/pmrms/notif/controller/EmailController.kt
+1
-1
EmailService.kt
...d/go/kemenag/madrasah/pmrms/notif/service/EmailService.kt
+3
-3
No files found.
src/main/kotlin/id/go/kemenag/madrasah/pmrms/notif/controller/EmailController.kt
View file @
48a63035
...
...
@@ -22,6 +22,6 @@ class EmailController {
@PostMapping
(
value
=
[
"send"
],
produces
=
[
"application/json"
])
fun
sendEmail
(
@Valid
@RequestBody
request
:
EmailRequest
):
ResponseEntity
<
ReturnData
>
{
return
service
.
sendE
am
il
(
request
)
return
service
.
sendE
ma
il
(
request
)
}
}
src/main/kotlin/id/go/kemenag/madrasah/pmrms/notif/service/EmailService.kt
View file @
48a63035
...
...
@@ -22,10 +22,10 @@ class EmailService {
@Value
(
"\${spring.mail.from}"
)
private
lateinit
var
emailFrom
:
String
fun
sendE
am
il
(
request
:
EmailRequest
):
ResponseEntity
<
ReturnData
>
{
fun
sendE
ma
il
(
request
:
EmailRequest
):
ResponseEntity
<
ReturnData
>
{
return
try
{
Thread
{
sendEmail
(
request
.
to
,
request
.
subject
,
request
.
message
)
sendEmail
Process
(
request
.
to
,
request
.
subject
,
request
.
message
)
}.
start
()
responseSuccess
()
}
catch
(
e
:
Exception
)
{
...
...
@@ -33,7 +33,7 @@ class EmailService {
}
}
private
fun
sendEmail
(
to
:
String
?,
subject
:
String
?,
message
:
String
?)
{
private
fun
sendEmail
Process
(
to
:
String
?,
subject
:
String
?,
message
:
String
?)
{
try
{
val
msg
=
SimpleMailMessage
()
msg
.
setTo
(
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