From 96c8ad7bf6f95ef1ef02a5866342593d44d14d6a Mon Sep 17 00:00:00 2001 From: pitzm Date: Thu, 4 Jul 2024 12:39:29 +0200 Subject: [PATCH] =?UTF-8?q?Port=20465=20(SMTP)=20muss=20mit=20ConnectSSL-M?= =?UTF-8?q?ethode=20ge=C3=B6ffnet=20werden.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Messaging/Mail/MailSession.vb | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Messaging/Mail/MailSession.vb b/Messaging/Mail/MailSession.vb index df3112d9..f45c44be 100644 --- a/Messaging/Mail/MailSession.vb +++ b/Messaging/Mail/MailSession.vb @@ -150,7 +150,7 @@ Namespace Mail If TypeOf Client Is Imap Then 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) Else Throw New ApplicationException("Only OAuth2 for IMAP is not yet supported!") @@ -166,11 +166,13 @@ Namespace Mail ElseIf pSession.AuthType = AUTH_SSL Then Try - If pSession.Port = 993 Then - Logger.Debug("Connecting with [ConnectSSL] on [{0}/{1}]", pSession.Server, pSession.Port) + ' Port 465 ist der SMTP-SSL-Port, wird bei der WISAG verwendet, aber veraltet + ' 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) 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) End If Logger.Info("Connection Successful!") @@ -188,10 +190,10 @@ Namespace Mail Try 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) 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) End If Logger.Info("Connection Successful!")