BierDav /
Kotlinmailer
A simple, modern and coroutine based Kotlin Email API for clientside projects
57/100 healthLoading repository data…
jakobkmar / repository
A simple, coroutine based Kotlin Email API for both client- and server-side projects
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
SimpleKotlinMail is a Kotlin Mail API, using coroutines and providing DSLs.
This project is not actively being worked on anymore, for an explanation and alternatives see https://github.com/jakobkmar/SimpleKotlinMail/issues/6#issuecomment-1082247403 .
The purpose of the following code snippets is to provide an insight into the API. However, they are not suitable for learning the API, you should use the actual documentation for this.
Build an email:
val email = emailBuilder {
from("no-reply@example.com")
to("foo@bar.com")
withSubject("Important question")
withPlainText("Hey, how are you doing?")
}
Send that email:
suspend fun main() = email.send()
Create a custom SMTPServer:
val smtpServer = smtpServer {
mailListener {
println(it.email.plainText)
}
}.start(keepAlive = true)
// EML String -> Email
string.toEmail()
// MimeMessage -> Email
mimeMessage.email
Inside the email builder, you can easily access kotlinx.html:
emailBuilder {
withHTML {
div {
h1 { +"Really important question!" }
p { +"Hey, how are you doing?" }
}
}
}
To learn more about SimpleKotlinMail, visit the Documentation.
This project uses SimpleJavaMail to deal with java MimeMessages in a more elegant way. On the server side, this projects depends on a fork of SubEthaSMTP.
If you use the documented functionality of SimpleKotlinMail, everything will make use of kotlinx.coroutines.
Selected from shared topics, language and repository description—not editorial ratings.
BierDav /
A simple, modern and coroutine based Kotlin Email API for clientside projects
57/100 health