Solved

Sync Outlook mail in .NET CRM application

Posted on 2011-09-12
12
396 Views
Last Modified: 2012-05-12
I am developing a CRM application which follows the typical Company > Contact system.

Every Client's contact have email addresses stored.

Now, users send emails to contacts via Outlook(sometimes Exchange server or sometimes just as a mail client for google Apps...)

What I want to be able to do is to track all these emails within the CRM.

For example when users are browsing client records, they should be able to see all the emails sent/received between users in the company and clients.

What are my options?

From my limited knowledge I am guessing that when a user is logged on I query the user's mailbox and save mails to database.

I am not sure whether to use MAPI or System.Net.Mail.

Any suggestions, links etc would be highly appreciated.
0
Comment
Question by:isaackhazi
  • 7
  • 5
12 Comments
 
LVL 11

Expert Comment

by:DavidT543
Comment Utility
I have written such a CRM system.

I use MAPI and Redemption to access the emails.

You need to monitor the sent items and inbox for new and existing messages.
Each message you look at the recipients collection and for each recipient you extract the email address.

You can either do this as an Outlook addin - or you can log on directly to the exchange server via MAPI or web services and query the users maillbox from there. The former is easier to set up as permissions are all in place. THe latter requires you to use an account with permissions like Balckberry server (BIS) to access all the mailboxes.
0
 
LVL 8

Author Comment

by:isaackhazi
Comment Utility
I would want to implement the first system as sometimes the mail server is not exchange and it could at times be Google Apps, so I would prefer to read emails from outlook rather than from the server.

So, once we get emails from the users outlook mail store, should I save the msg to disk and store it in the database. Is that the right way to do it?
0
 
LVL 8

Author Comment

by:isaackhazi
Comment Utility
I would be greatful if you Could you provide me some code samples or links that would help me get started as I have never worked with MAPI objects or redemption before.

0
 
LVL 11

Expert Comment

by:DavidT543
Comment Utility
There are lots of ways to do this. A lot depends on how you want to display the information to users.

I would read the message body and store that. It could be in plain text - or in HTML so you will need to review that.

What database are you going to use? How will users access the database?

If you want to see how I implemented it - you can look at http://www.davton.com/crm.html
0
 
LVL 11

Expert Comment

by:DavidT543
Comment Utility
You are on a very steep learning curve with Outlook and MAPI.

I suggest you start with the Outlook Code web site. It has lots of code samples.
http://www.outlookcode.com/article.aspx?ID=37

There are two books which i have found invaluable:

Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators
by Sue Mosher

Professional Outlook 2007 Programming
by Ken Slovak
0
 
LVL 11

Expert Comment

by:DavidT543
Comment Utility
The redemption software provides ways to do stuff you can't do in the Outlook object model - and at much faster speeds.

http://www.dimastr.com/redemption/

0
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 11

Assisted Solution

by:DavidT543
DavidT543 earned 500 total points
Comment Utility
by the way with redemption its the RDO family of objects you want to work with. They will give you access to folders, item collections, emails, email body, recipient collections etc
0
 
LVL 8

Author Comment

by:isaackhazi
Comment Utility
Ideally I would want to save the entire message msg format into database.
I am using SQl server 2008 R2.

It is a recruitment CRM system that tracks applicants and this will be one part/feature of this applicant tracking system where emails sent/received to applicants or clients will be tracked and stored in the database.

Users will see all messages associated with the applicant or client when they view the applicant /client profile ....

This is the idea....
0
 
LVL 8

Author Comment

by:isaackhazi
Comment Utility
I have checked your implementation and it seems you have integrated the CRM into Outlook.

All I need is to save message files from inbox/sent items to database.

These messages will be displayed (in a simple grid) in the CRm application which is a standalone app.

on clicking the message I will write the msg file to disk and open it in the default mail client(Outlook).

0
 
LVL 11

Accepted Solution

by:
DavidT543 earned 500 total points
Comment Utility
If you look at how HighRise do their CRM- they have an email address which you can use to bcc mails that get sent and received if you want them to add to the system. Would that work for you?

http://highrisehq.com/tour#email
0
 
LVL 8

Author Comment

by:isaackhazi
Comment Utility
I guess it would be best for me to see if my approach is right. I guess you would be the best person to advice me.

I have a table with all Applicants (50k)
I have another table with contacts(2-3K)


When a user logins into the CRM.
I authenticate based on the default mail profile on the system.
Search the Inbox/Sent items to see if to/from address matches the emails in my 2 tables mentioned above...

If it does write message to file and save to database,...

This way all user mail will be saved to DB and can be viewed by all users..

Is this approach correct?
0
 
LVL 11

Assisted Solution

by:DavidT543
DavidT543 earned 500 total points
Comment Utility
There is not one approach that is 'correct'. Your method sounds like it will work.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now