I am trying to connect to a remote exchage server in order to retrieve emails
and process them. My problem is that I have no idea how to connect to the
remote exchange server.
I have the following code and I think that after I create the namespace I am
supposed to used the logon method to connect to the remote server but am
unser as to how it would look:
' Create Outlook application.
Dim oApp As Outlook.Application = New Outlook.Application
' String used for comparison with mail item.
Dim sClassComp = "IPM.Note"
' Get Mapi NameSpace.
Dim oNS As Outlook.NameSpace = oApp.GetNamespace("MAPI")
' Get Messages collection of Inbox.
Dim oInbox As Outlook.MAPIFolder =
oNS.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderInbox)
Dim oItems As Outlook.Items = oInbox.Items
Any help would be greatly appreciated
|