Skip to content

Commit

Permalink
fix(matomo): add simple heuristic to choose smtp encryption mode
Browse files Browse the repository at this point in the history
  • Loading branch information
kosmoz committed Nov 5, 2024
1 parent 72a8b10 commit e36625c
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,15 @@ class MatomoConfigSecret(private val objectMapper: ObjectMapper) :
"type" to "LOGIN",
"username" to authSecret.data.getValue("username").decodeBase64(),
"password" to authSecret.data.getValue("password").decodeBase64(),
"encryption" to if (smtp.tlsEnabled) "tls" else ""
"encryption" to
when (smtp.tlsEnabled) {
true -> when (smtp.port) {
465, 2465 -> "ssl"
else -> "tls"
}

false -> ""
}
)
}
}
Expand Down

0 comments on commit e36625c

Please sign in to comment.