-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3eceb59
commit d529dd7
Showing
1 changed file
with
2 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ Depends on [klite-i18n](../i18n) for translations. | |
|
||
To use it, initialize the correct implementation when creating the Server instance: | ||
```kotlin | ||
register(if (Config.isDev) FakeEmailService::class else RealEmailService::class) | ||
register(if (Config.isDev) FakeEmailSender::class else SmtpEmailSender::class) | ||
``` | ||
|
||
Add approprate content to your translation files, e.g. `en.json`: | ||
|
@@ -24,7 +24,7 @@ Add approprate content to your translation files, e.g. `en.json`: | |
|
||
Then you can send emails like this: | ||
```kotlin | ||
emailService.send(Email("[email protected]"), EmailContent("en", "welcome", mapOf("name" to "John"), URI("https://github.com/login"))) | ||
emailSender.send(Email("[email protected]"), EmailContent("en", "welcome", mapOf("name" to "John"), URI("https://github.com/login"))) | ||
``` | ||
|
||
You can redefine HTML email template by extending `EmailContent` class. |