diff --git a/src/main/kotlin/apply/application/mail/MailMessageService.kt b/src/main/kotlin/apply/application/mail/MailMessageService.kt index 0a87b31fd..ded9d0dc9 100644 --- a/src/main/kotlin/apply/application/mail/MailMessageService.kt +++ b/src/main/kotlin/apply/application/mail/MailMessageService.kt @@ -69,7 +69,7 @@ class MailMessageService( reservations.forEach { mailReservation -> mailReservation.send() mailReservationRepository.save(mailReservation) - sendingMailService.sendByBccSynchronous(MailData(messagesById.getValue(mailReservation.mailMessageId))) + sendingMailService.sendMailByBccSynchronous(MailData(messagesById.getValue(mailReservation.mailMessageId))) mailReservation.finish() } } diff --git a/src/main/kotlin/apply/application/mail/SendingMailService.kt b/src/main/kotlin/apply/application/mail/SendingMailService.kt index bae8ffec3..7fb80fe52 100644 --- a/src/main/kotlin/apply/application/mail/SendingMailService.kt +++ b/src/main/kotlin/apply/application/mail/SendingMailService.kt @@ -91,7 +91,7 @@ class SendingMailService( } @Async - fun sendByBcc(request: MailData, files: Map) { + fun sendMailByBcc(request: MailData, files: Map) { val mailMessage = mailMessageRepository.save(request.toMailMessage()) val body = generateMailBody(request) val recipients = request.recipients + mailProperties.username @@ -107,7 +107,7 @@ class SendingMailService( saveMailHistories(mailMessage.id, succeeded, failed) } - fun sendByBccSynchronous(request: MailData, files: Map = emptyMap()) { + fun sendMailByBccSynchronous(request: MailData, files: Map = emptyMap()) { val mailMessage = mailMessageRepository.save(request.toMailMessage()) val body = generateMailBody(request) val recipients = mailMessage.recipients + mailProperties.username diff --git a/src/main/kotlin/apply/ui/admin/mail/MailsFormView.kt b/src/main/kotlin/apply/ui/admin/mail/MailsFormView.kt index f1c657a43..f19c22fa8 100644 --- a/src/main/kotlin/apply/ui/admin/mail/MailsFormView.kt +++ b/src/main/kotlin/apply/ui/admin/mail/MailsFormView.kt @@ -70,7 +70,7 @@ class MailsFormView( if (result == null) { createNotification("받는사람을 한 명 이상 지정해야 합니다.") } else { - sendingMailService.sendByBcc(result, result.attachments) + sendingMailService.sendMailByBcc(result, result.attachments) UI.getCurrent().navigate(MailsView::class.java) } } diff --git a/src/main/kotlin/apply/ui/api/MailRestController.kt b/src/main/kotlin/apply/ui/api/MailRestController.kt index 0e72e9c5c..31b31b32f 100644 --- a/src/main/kotlin/apply/ui/api/MailRestController.kt +++ b/src/main/kotlin/apply/ui/api/MailRestController.kt @@ -27,7 +27,7 @@ class MailRestController( @LoginUser(administrator = true) user: User ): ResponseEntity { val inputStreamFiles = files.associate { (it.originalFilename!! to ByteArrayResource(it.bytes)) } - sendingMailService.sendByBcc(request, inputStreamFiles) + sendingMailService.sendMailByBcc(request, inputStreamFiles) return ResponseEntity.noContent().build() }