isaackhazi
asked on
Sync Outlook mail in .NET CRM application
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.
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.
ASKER
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?
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?
ASKER
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.
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
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
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
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
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/
http://www.dimastr.com/redemption/
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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....
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....
ASKER
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).
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).
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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?
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?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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.