0

I'm developing a CRM that will store emails from an exchange server via EWS Managed API on a local DB. I'm very new to EWS. Have you done anything similar?

  • What data structure do you suggest for items?
  • Any reason I should have different tables for email and calender?
  • What should be the primary key?
  • How do I handle attachments?

P.S I have done this previously via IMAP and download items headers first. Then download full item using UID when necessary.

JasonMArcher
  • 12,386
  • 20
  • 54
  • 51
Iternity
  • 802
  • 3
  • 10
  • 27

1 Answers1

0

The most important types in EWS managed API for your case is the Item type. Task, Contact, Email message, Appointment, Post item and Distribution lists all inherit from the Item class. I have used this API for 3 months developing WCF rest service and never stored the data. However, I think that you need to create a separate tables for each type mentioned before (except Item because it is more abstract).For example, the contact type has a property named "Job title", so how to store it if we use the Item type schema for all things!
The Id for DB may be the same as item id property (uniqueID). Finally, I think finding the corresponding relations between things (emails ad contacts,tasks and contacts, appointments and contacts, contacts and groups...) needs some thinking.