Exchange email monitoring

chris_cs

Member
Joined
May 23, 2007
Messages
14
Programming Experience
1-3
Hey Guys,

I have been asked to look at developing something that will monitor incoming email and act when a certain condition is met.

I'm not really sure where to start with this, so I hoped that someone could point me in the right direction.

What should I be looking into for connecting to Exchange? Also, I wondered what you guys thought would be the best way to go about this? Should this be done as a service etc....

Any suggestions gratefully received!
 
After looking into this I'm going to use an Add-in in Outlook instead. I'm having an issue with the following code though:

Private Sub ThisApplication_NewMail() Handles Me.NewMail
Dim outlookNameSpace As Outlook.NameSpace = Me.GetNamespace(“MAPI”)
Dim inbox As Outlook.MAPIFolder = outlookNameSpace.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderInbox)
Dim items As Outlook.Items = inbox.Items
Items.Restrict(“[Unread] = true”)
MsgBox(items.Count)
End Sub

I would expect it to give a count of 1 when a new message arrives but it counts the entire inbox. Any ideas where I'm going wrong?
 
Back
Top