Messaging: First working version of OAuth2
This commit is contained in:
@@ -30,11 +30,16 @@ Namespace Mail
|
||||
End Sub
|
||||
|
||||
Public Function Connect(pServer As String, pPort As Integer, pUser As String, pPassword As String, pAuthType As String) As MailSession.SessionInfo
|
||||
Return MailSession.ConnectToServer(pServer, pPort, pUser, pPassword, pAuthType, New MailSession.MailSessionOptions)
|
||||
Return MailSession.ConnectToServerWithBasicAuth(pServer, pPort, pUser, pPassword, pAuthType, New MailSession.MailSessionOptions)
|
||||
End Function
|
||||
|
||||
Public Function ConnectToO365(pUser As String, pClientId As String, pTenantId As String, pClientSecret As String)
|
||||
Dim oOptions = New MailSession.MailSessionOptions With {.EnableTls1_2 = True}
|
||||
Return MailSession.ConnectToServerWithO365OAuth(pUser, pClientId, pTenantId, pClientSecret, oOptions)
|
||||
End Function
|
||||
|
||||
Public Function Connect(pServer As String, pPort As Integer, pUser As String, pPassword As String, pAuthType As String, pOptions As MailSession.MailSessionOptions) As MailSession.SessionInfo
|
||||
Return MailSession.ConnectToServer(pServer, pPort, pUser, pPassword, pAuthType, pOptions)
|
||||
Return MailSession.ConnectToServerWithBasicAuth(pServer, pPort, pUser, pPassword, pAuthType, pOptions)
|
||||
End Function
|
||||
|
||||
Public Function Disconnect() As Boolean
|
||||
|
||||
Reference in New Issue
Block a user