Solved

Sync Outlook mail in .NET CRM application

Posted on 2011-09-12
12
404 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 5
12 Comments
 
LVL 11

Expert Comment

by:DavidT543
ID: 36527731
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
ID: 36528019
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
ID: 36528056
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
How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

 
LVL 11

Expert Comment

by:DavidT543
ID: 36528060
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
ID: 36528087
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
ID: 36528090
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
 
LVL 11

Assisted Solution

by:DavidT543
DavidT543 earned 500 total points
ID: 36528101
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
ID: 36528183
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
ID: 36528198
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
ID: 36528277
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
ID: 36528294
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
ID: 36528394
There is not one approach that is 'correct'. Your method sounds like it will work.
0

Featured Post

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

734 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