commonMain.raven.SendEmailParamsFactory.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of raven-email-core-jvm Show documentation
Show all versions of raven-email-core-jvm Show documentation
An abstraction form sending emails
package raven
fun SendEmailParams(
from: String,
to: String,
subject: String,
body: String,
attachments: List> = emptyList()
) = SendEmailParams(
from = Address(from),
to = listOf(Address(to)),
subject = subject,
body = body,
cc = emptyList(),
bcc = emptyList(),
attachments = attachments
)
fun SendEmailParams(
from: Address,
to: Address,
subject: String,
body: String,
attachments: List> = emptyList()
) = SendEmailParams(
from = from,
to = listOf(to),
subject = subject,
body = body,
cc = emptyList(),
bcc = emptyList(),
attachments = attachments
)
fun SendEmailParams(
from: Address,
to: List,
subject: String,
body: String,
attachments: List> = emptyList()
) = SendEmailParams(
from = from,
to = to,
subject = subject,
body = body,
cc = emptyList(),
bcc = emptyList(),
attachments = attachments
)