All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.raven.ConsoleEmailConfiguration.kt Maven / Gradle / Ivy

There is a newer version: 3.0.11
Show newest version
package raven

fun AgentConfiguration.toConsoleEmailAgent(): Sender {
    return ConsoleEmailAgent(toConsoleEmailAgentOptions())
}

fun AgentConfiguration.toConsoleEmailAgentOptions(): ConsoleEmailAgentOptions {
    val formatter = PrettyConsoleEmailFormatter(
        PrettyConsoleEmailFormatterOptions(
            separator = params["separator"] ?: "=",
            width = params["width"]?.toIntOrNull() ?: 95,
            margin = params["margin"]?.toIntOrNull() ?: 25,
            border = params["border"] ?: "|",
            padding = params["padding"]?.toIntOrNull() ?: 1
        )
    )
    return ConsoleEmailAgentOptions(outbox = outbox, formatter = formatter)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy