Best Approach to Programically Parse Email

vinnie881

Well-known member
Joined
Sep 3, 2006
Messages
152
Programming Experience
3-5
I am soon going to be starting a project where I need to parse the subject lines of email that arrives (As soon as it arrives).

What is the best method for doing this large scale (over 100,000 Emails per day).

the company already uses exchange server, is there a api that will allow me to do this, or is the approach to write code to connect to a outlook client instead?

Also is it better to look into getting a very light weight email server instead of Exchange that has this type of ability already and do it that way?

Please let me know what the best approach would be.

Thanks.
 
With such a high email throughput, I would not move away from exchange. I can imagine all sorts of problems if you mess up the config of the new server :)


The following link may be of use to you


http://www.codeproject.com/KB/vb/AccRemoteExchange.aspx

I don't think performance should be too much of an issue, If we assume all 100000 emails arrive in a 10-hour period, we are looking at maybe 3 per second.
Depending on what information you are processing, this won't make even a 3-4 yr old cpu break into a sweat.
 
Very helpful.

Thanks

The only issue I see is that I would need to have the program constantly check when a email comes in. Is there a way to retrieve a notice as soon as the mail comes in (Like monitor the port or somethings?)
 
Does the email have to be parsed immediately, or is a delay of a minute or 2 acceptable?

If Yes( Delay acceptable), then that will make your application more scaleable, as it will be able to handle a higher volume of traffic.

If not, then off the top of my head, you could maybe look at creating a lightweight IMAP client in your app. IMAP has a WAIT command nowadays, that will literally just hang there until new email arrives, at which stage it will continue. You could run that on a seperate thread (For obvious reasons) and fire an event in your program when the WAIT command triggers.

doing this via IMAP will also mean that your app is compatible with many other email srevers too...

If Yes( Delay acceptable), then

Thats what happens when programmers attempt english.
 
It's hard to explain the reason, but just go with me on this. Any delay would not be acceptable in retrieving the message post it arriving for the purpose of this application.

With the Imap wait command, is this instant notification, or is there a small delay(i.e. > 5 Seconds)?

If > 5 seconds, is there a option that would allow me to get that delay down to under 5 seconds?

Thanks!
 
AFAIK, it's instant, but this may technically still have a delay due to exchnage processing the email.

If you need true instant, then I think you need to consider writing a simple SMTP Client that will listen on port25 for the incoming email, parse the info, and then pass it directly in to the exchange server. You will obviously need to reconfig the exchange server to listen on another port though, but it shouldn't be too difficult to do.
 
Back
Top