Skip to content
This repository was archived by the owner on May 25, 2022. It is now read-only.

Commit 8bcd27b

Browse files
committed
Update readme.md
1 parent 7df8471 commit 8bcd27b

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

readme.md

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
SimpleKotlinMail is a Kotlin Mail API, using Kotlin Coroutines all the way through.
44

5-
**This project is still in development, but expect it to be production ready soon**
6-
75
## Features
86

97
- build emails
@@ -31,10 +29,13 @@ val email = emailBuilder {
3129
Send that email:
3230

3331
```kotlin
32+
// asynchronously
3433
suspend fun main() = email.send()
34+
// or synchronously
35+
suspend fun main() = email.sendSync()
3536
```
3637

37-
or send that email with async callbacks:
38+
or send that email with asynchronous callbacks:
3839

3940
```kotlin
4041
suspend fun main() = email.send(
@@ -48,11 +49,17 @@ suspend fun main() = email.send(
4849
Create a custom SMTPServer:
4950

5051
```kotlin
51-
fun main() = smtpServer {
52+
val smtpServer = smtpServer {
5253
mailListener {
53-
println(it.email.htmlText)
54+
println(it.email.plainText)
5455
}
55-
}
56+
}.start(keepAlive = true)
57+
```
58+
59+
Stop the server:
60+
61+
```kotlin
62+
smtpServer.stop()
5663
```
5764

5865
## Project information

0 commit comments

Comments
 (0)