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,
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

AmitIT ArchitectCommented:
Powershell is the powerful tool given my MS for Exchange, Why don't you use that. Also, what you want to monitor? I want to know the end goal.
russell12Author Commented:
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.
Fareed Ali KhanCommented:
You can use the EWS (i.e. Exchange web service) SubscribeToPullNotifications

Attaching the sample code which is also available on MS site
Making Bulk Changes to Active Directory

Watch this video to see how easy it is to make mass changes to Active Directory from an external text file without using complicated scripts.

Fareed Ali KhanCommented:
Or you can subscribe the push notification. In push subscription Exchange server will send the notifications to the subscribed web service in case new email event occurred.

Reference URL to push notification:

Reference URL of sample application and web service:
If you go the Outlook route, you can also subscribe to new email notifications

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
AmitIT ArchitectCommented:
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.
russell12Author Commented:
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!!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.