parsing email messages, content and attachments out of mail client or mail server

Hi Experts!

I'm looking to automate collection of our email.

I'm looking for a library / interface etc. that will let me programmatically access the content of various mailboxes / message stores in our organisation, and then save out the content (fields, message, attachements etc.), analyse them, and depending on them move/copy/delete the email.

Is it easier to "get at" the server or the mail client?

We are running Exchange 6.5 (SBS 2003's version of Exchange) and Outlook 2003. My programming language of choice is C# and I will want to put the content (selectively) into our domain specific CRM database (which uses Advantage Database Server) (though this last fact or two are hardly relevant - more an explanation for why I'm preferring to use C#)

I do want to make this into a product (or part of a larger product that solves a domain problem) eventually, so is there a generic interface that *all*, *most* or even *some* clients and/or mail servers expose?

any help appreciated, and if anyone has experience of the above type of project pls don't hesitate to share...

thanks in advance!
zorba111Asked:
Who is Participating?
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.

F IgorDeveloperCommented:
You could check some c# libraries and tutorials to connect via IMAP protocol (almost all email servers supports this protocol)

https://code.msdn.microsoft.com/windowsdesktop/Simple-IMAP-CLIENT-b249d2e6
0

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
Éric MoreauSenior .Net ConsultantCommented:
for a long time, I have used http://www.limilabs.com/mail

and I now switch to http://www.aspose.com/.net/email-component.aspx (mainly because I use other Aspose components)
1
MlandaTCommented:
LimiLabs, Aspose.Email, OpenPOP, Rebex, MailBee.NET, etc... are great options, and so is IMAP. However, in some of my work on document management and email archiving projects, a challenge with those is that they are client side, and create the need to:
1 - Configure the application with the details (including password) of each account being monitored
2 - Run several "send and receive processes" against each account etc
If the Exchange supports delegation (i.e. allowing the "user" account which the application uses to access mail in all the other accounts, then the situation is a lot better, but you need a mail client that will understand this sort of thing as well.

More often than not, we end up using journaling (see 1, see 2) which sends a copy of the message to the journal mailbox. You can then process this journal mailbox through POP/IMAP etc.

In a few (more complex and enterprise, and not just Exchange) setups, we created an SMTP proxy before the Exchange Server (similar to how many spam filter configurations work, where the mail is spam-checked long before it even hits the exchange server).
0
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.

zorba111Author Commented:
I think the best way would be to go into the mail server and get the messages out.

An API would be good if the server is in the LAN or on the machine. If the mailserver is remote then we would have to use IMAP.

I presume IMAP can also be used for local mailservers? (of course, just provide a local IP or domain hostname?)

Using IMAP, can we manipulate the messages on the server *as well as* read them.
Eg. if we succesfully process a message, then we wnat to move it to another folder called "processed".

Do you guys think IMAP is the way to go here?
We want to create a generic solution that can be configured for all/most mailservers.
The customer sets up their "read" directory and their "processed" directory, and then its down to our daemon to do the rest.

IMAP is platform and implementation agnostic? so suits this generic case?

typically we will want to login to several users mailboxes per organisation, and do autoprocessing
0
F IgorDeveloperCommented:
Actually IMAP is the best option for many reasons over POP3. It was designed for a complete management of email accounts and it's supported by all modern email servers.

You should consider that auto-processing intervals and scanning techniques must be carefully planned to avoid overhead in the server-side.
1
zorba111Author Commented:
Yes, probably every five minutes per mailbox should suffice.
thanks

so you agree that IMAP is better than using an API?

many thanks
0
F IgorDeveloperCommented:
I think you could use some API if it's implemented over IMAP, and can  help you in facilitate the access to the backend protocol.  Also using an IMAP-based component with a user-level API could be great if you don't want to implement low-level comunication using this protocol directly.
1
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
Email Servers

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.