EmailService: Update to .NET 4.8, make tls version configurable

This commit is contained in:
Jonathan Jenne
2023-01-23 09:33:30 +01:00
parent f763ac6f49
commit 311e4c3dc9
7 changed files with 45 additions and 36 deletions

View File

@@ -348,7 +348,11 @@ Public Class EmailService
' ======= Connect to server =======
Dim oResult = _MailSender.ConnectToServer(oAccount.Server, oAccount.Port, oAccount.Username, oAccount.Password, oAccount.AuthType)
Dim oOptions As New MailSender.MailSenderOptions() With {
.TlsVersion = _Config.TlsVersion
}
Dim oResult = _MailSender.ConnectToServer(oAccount.Server, oAccount.Port, oAccount.Username, oAccount.Password, oAccount.AuthType, oOptions)
If oResult = False Then
_Logger.Warn("Could not connect to server. Skipping.")