22 lines
675 B
Kotlin
22 lines
675 B
Kotlin
package kr.co.vividnext.sodalive.email
|
|
|
|
import com.amazonaws.services.simpleemail.model.Destination
|
|
import com.amazonaws.services.simpleemail.model.SendTemplatedEmailRequest
|
|
|
|
data class TemplatedEmailSenderDto(
|
|
private val senderEmail: String,
|
|
private val template: String,
|
|
private val templateData: String,
|
|
private val to: String
|
|
) {
|
|
fun toSendRequest(): SendTemplatedEmailRequest {
|
|
val destination = Destination().withToAddresses(to)
|
|
|
|
return SendTemplatedEmailRequest()
|
|
.withTemplate(template)
|
|
.withDestination(destination)
|
|
.withSource(senderEmail)
|
|
.withTemplateData(templateData)
|
|
}
|
|
}
|