Port 465 (SMTP) muss mit ConnectSSL-Methode geöffnet werden.

This commit is contained in:
PitzM 2024-07-04 12:39:29 +02:00
parent 1aed9a51f7
commit 96c8ad7bf6

View File

@ -150,7 +150,7 @@ Namespace Mail
If TypeOf Client Is Imap Then If TypeOf Client Is Imap Then
Dim oClient As Imap = Client Dim oClient As Imap = Client
Logger.Debug("Connecting with [ConnectSSL] on [{0}]", pSession.Server) Logger.Debug("Connecting with [OAuth2/ConnectSSL] on [{0}]", pSession.Server)
oClient.ConnectSSL(pSession.Server) oClient.ConnectSSL(pSession.Server)
Else Else
Throw New ApplicationException("Only OAuth2 for IMAP is not yet supported!") Throw New ApplicationException("Only OAuth2 for IMAP is not yet supported!")
@ -166,11 +166,13 @@ Namespace Mail
ElseIf pSession.AuthType = AUTH_SSL Then ElseIf pSession.AuthType = AUTH_SSL Then
Try Try
If pSession.Port = 993 Then ' Port 465 ist der SMTP-SSL-Port, wird bei der WISAG verwendet, aber veraltet
Logger.Debug("Connecting with [ConnectSSL] on [{0}/{1}]", pSession.Server, pSession.Port) ' Port 993 ist der IMAP-SSL-Port, zum Abholen der Mails
If pSession.Port = 465 Or pSession.Port = 993 Then
Logger.Debug("Connecting with [SSL/ConnectSSL] on [{0}/{1}]", pSession.Server, pSession.Port)
Client.ConnectSSL(pSession.Server, pSession.Port) Client.ConnectSSL(pSession.Server, pSession.Port)
Else Else
Logger.Debug("Connecting with [Connect] on [{0}/{1}]", pSession.Server, pSession.Port) Logger.Debug("Connecting with [SSL/Connect] on [{0}/{1}]", pSession.Server, pSession.Port)
Client.Connect(pSession.Server, pSession.Port) Client.Connect(pSession.Server, pSession.Port)
End If End If
Logger.Info("Connection Successful!") Logger.Info("Connection Successful!")
@ -188,10 +190,10 @@ Namespace Mail
Try Try
If pSession.Port = 993 Then If pSession.Port = 993 Then
Logger.Debug("Connecting with [ConnectSSL] on [{0}/{1}]", pSession.Server, pSession.Port) Logger.Debug("Connecting with [STARTTLS/ConnectSSL] on [{0}/{1}]", pSession.Server, pSession.Port)
Client.ConnectSSL(pSession.Server, pSession.Port) Client.ConnectSSL(pSession.Server, pSession.Port)
Else Else
Logger.Debug("Connecting with [Connect] on [{0}/{1}]", pSession.Server, pSession.Port) Logger.Debug("Connecting with [STARTTLS/Connect] on [{0}/{1}]", pSession.Server, pSession.Port)
Client.Connect(pSession.Server, pSession.Port) Client.Connect(pSession.Server, pSession.Port)
End If End If
Logger.Info("Connection Successful!") Logger.Info("Connection Successful!")