Problem with connecting a VB .net program to different e-mail clients
Hi,
I have a VB program that reads all the mail in a mailbox to analyze it. It works well if it is running on a PC with Outlook installed. I want it to read even with a different client installed. I have tried with eM-client, but I don’t know
how to do it. The program is created in Visual Studio 2019. In the code below I would like to find an easy way to use a different Application object and probably for the others too.
Anyone knows how to do it?
Janne
Public
Sub AnalyzeMail()
Dim ix1, ix2
PgmOutlAppl = New Outlook.Application()
Dim MyMailFolder
As Outlook.Folder
Dim MyOutlNs
As Outlook.NameSpace
Dim MyMailItem
As Outlook.MailItem
MyOutlNs = PgmOutlAppl.Session
If PgmCheckJunkBox
Then
'
MyMailFolder = MyOutlNs.GetDefaultFolder(Outlook.OlDefaultFolders _
.olFolderInbox).Parent.Folders(PgmMailFlrStr1)
Else
MyMailFolder = MyOutlNs.GetDefaultFolder(Outlook.OlDefaultFolders _
.olFolderInbox).Parent.Folders(PgmMailFlrStr)
End
If