Messaging: OAuth Sending

Jobs: Sichtbeleg Anpassungen, Seitenwechsel, Freiräume und Taxpos
This commit is contained in:
Developer01
2026-06-30 10:29:00 +02:00
parent 7377a9176e
commit b6d3e61488
7 changed files with 2716 additions and 543 deletions

View File

@@ -1,5 +1,4 @@
Imports System.IdentityModel.Tokens
Imports System.Net.Security
Imports System.Net.Security
Imports DigitalData.Modules.Base
Imports DigitalData.Modules.Logging
Imports Limilabs.Client
@@ -91,11 +90,11 @@ Namespace Mail
Public Function ConnectToServerWithO365OAuth(pUser As String, pClientId As String, pTenantId As String, pClientSecret As String, pOptions As MailSessionOptions) As SessionInfo
' Choose server/port based on the client type
Dim server As String = If(TypeOf Client Is Smtp, "smtp.office365.com", OAuth2.O365_SERVER)
Dim oServer As String = If(TypeOf Client Is Smtp, "smtp-mail.outlook.com", OAuth2.O365_SERVER_IMAP)
Dim port As Integer = If(TypeOf Client Is Imap, 993, If(TypeOf Client Is Smtp, 587, 993))
Dim oSession = New SessionInfo With {
.Server = server,
.Server = oServer,
.Port = port,
.ClientId = pClientId,
.ClientSecret = pClientSecret,