I am writing a support system, and this is my first time using EWS. So far, I have been quite successful. I can extract the information I need. Submit emaisl and everything works fine. I have a slight headache. Is there a way to tell if the letter is really the answer? The main idea of ββthe application is someone sends an email. We respond and give them the reference number. This is done and works great. Now, if they respond to the same address, we need to write it a little differently in our database. so i need a magical way to find out if the email is the answer. So far, I'm stuck.
Any suggestions would be greatly appreciated as I am new to the programming industry and so far googling has not brought anything useful. Here I include a section of code
FindItemsResults<Item> findResults = service.FindItems(WellKnownFolderName.Inbox, view); foreach (Item myItem in findResults.Items.Where(i => i is EmailMessage)) { var mailItem = myItem as EmailMessage; if (!mailItem.IsRead) { // load primary properties and get a text body type mailItem.Load(propertySet); // Update the item to isRead in email mailItem.IsRead = true; mailItem.Update(ConflictResolutionMode.AutoResolve); //Check if it is a reply and mark the msg as such // add message to list SupportEmailMessage msg = new SupportEmailMessage(); msg.Subject = mailItem.Subject; msg.MessageBody = mailItem.Body.Text; msg.DateSent = mailItem.DateTimeSent; msg.Sender = mailItem.Sender.Address; toReturnList.Add(msg); } }
c # exchangewebservices
Kapteinmarshall
source share