Incorporating email into CiviCRM
Integrating CiviCRM with an email client (specifically Outlook) has been a long requested feature. Unfortunately we dont really have any internal windows expertise to make this happen (for now). For now, we've built some code for the HRD project that attaches incoming email as an activity to the contact record of emails that are in the from / to / cc / bcc fields (we create a contact record if not found)
We are currently using ezComponents Mail library to read and process incoming emails. If possible i'd like to transition this to using the Zend Framework, since that will be our basic library framework for CiviCRM v3.0.
The current approach is file based. The cron script takes a directory argument. The directory contains all the mail files that need to be converted to a CiviCRM Activity. On completion, the mail is moved to a date-stamped processed directory or error directory depending on whether the conversion was successful or not.
The libraries for parsing email are quite powerful and easy to use. Each email is broken into smaller parts and attachments are stored as files. We've separated the mail parsing code from the activity creation code, so other components could potentially use the mail object for other purposes. Activities now have optional file attachment(s) (this was a generalization from our earlier 2.1 attachments to CiviMail issue). All email 'file' attachments are stored as activity attachments.
Using the above libraries, it should be quite easy to add a layer to retrieve email from a pop or imap server. Would be great for someone in the community to step up and submit code to process email(s) from imap and pop accounts.
I'm not sure whats required to integrate this with a desktop client. I suspect a modification of the script that accepts an email as a POST message will makes things easier. Please contact us if you have any interest / expertise in this area and willing to contribute a few hours to make this happen