Link to home
Start Free TrialLog in
Avatar of russell12
russell12Flag for United States of America

asked on

MS Exchange Mailbox and VB.NET

I am wanting to be able to monitor a MS exchange mailbox and parse out keywords in the body.  I have a mailbox setup for this already and I have also gotten code for retrieving via pop3 and parsing, but I do not want to query the server every 5 secs.  I do not think this is an effective way.  The exchange server will be on the local network.  Any guidance in this issue would be greatly appreciated!!

Thanks in advance,
Russell
SOLUTION
Avatar of Amit
Amit
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of russell12

ASKER

I work with the IT department in a police department.  I have written there current CAD for them, and the CAD sends text messages via SMPT.  I want some way of monitoring the mailbox for any reply's to the mailbox and pick up on keywords to send more information.  Example:  Officer responds with Times 1234       I want to be able to pick up "Times 1234" and send all times related to call number 1234.  I am not very fluent with PowerShell to be honest with you, but I know how research, I will research this option.  I have also looked into running outlook and writing a macro to insert into a db the emails coming in and have SQLDependency report back a change on that table and have the service I am creating for this read the db.  I just dont want to overload the network.
You can use the EWS (i.e. Exchange web service) SubscribeToPullNotifications

https://msdn.microsoft.com/en-us/library/office/dn458790%28v=exchg.150%29.aspx

Attaching the sample code which is also available on MS site
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You can use search-mailbox command let. Write the logic according to your requirement and generate an alert. I guess it should not take more than 3-4 line code for your requirement. first Search that mailbox with that key word and send the alert.
I decided to use the outlook route.  Fareed, I failed to mention I am running Exchange 2003, I could not find any information on Exchange 2003 for push notifications, but I will definitely keep this in mind as we are looking to upgrade servers at the pd.  When we do upgrade, we will also upgrade Exchange and I will be able to utilize this feature.  But for the time being, I am using Outlook 2007 sitting on the server running constantly and created a service to check to make sure the process is still running and if it is not to start Outlook back.  This is not the way I wanted to do it, but it is working well.  Amit, I am not good enough with powershell to be able to utilize it.  Although, your answer is also correct, it will work after researching your method.  I really appreciate all the responses, and I gave points to all as all answers are good answers and will ultimately get the job done!  Thank you again!!
Russell