commonMain.raven.ConsoleEmailConfiguration.kt Maven / Gradle / Ivy
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 - 2025 Weber Informatics LLC | Privacy Policy