none
EWS C# - how can I get the message that a read receipt refers to? RRS feed

  • Question

  • Hi there

    Was wondering if it is possible to get the message (i assume from sent items) that a received read receipt refers to? I found out that I can use the ItemClass property to determine if the message is a read receipt but I need to be able retrieve the message it refers to so i can perform some actions elsewhere in my code.

    Many thanks

    James Slade

    Monday, June 27, 2011 2:19 PM

Answers

  • Hi,

    here you go:
    http://www.infinitec.de/post/2011/06/27/Correlating-a-Non-Delivery-Notification-to-its-original-message-with-the-Exchange-Managed-API.aspx

    Kind regards,
    Henning Krause

    "BagpussUK" wrote in message news:f6f35f71-874e-41e4-90ea-f822b5a8c143@communitybridge.codeplex.com...  Thanks for the reply. I'm a bit of a noob to EWS and i got a bit lost in that link you sent me. Below is the code i was using to attempt to find the message in the sent items. The search returns 0 items. Any help would be appriciated!

    using EWS = Microsoft.Exchange.WebServices.Data;
    
    ...<br/><br/>EWS.EmailMessage boundEmail =
    EWS.EmailMessage.Bind(m_ExchangeService, syncEmailMessage.Id);
    EWS.SearchFilter filter = new
    EWS.SearchFilter.IsEqualTo(EWS.EmailMessageSchema.InternetMessageId,
    boundEmail.InReplyTo);
    EWS.ItemView view = new EWS.ItemView(512);
    
    var search = m_ExchangeService.FindItems(EWS.WellKnownFolderName.SentItems,
    filter, view);
    

    James

    • Marked as answer by BagpussUK Tuesday, June 28, 2011 7:40 AM
    Monday, June 27, 2011 6:12 PM

All replies

  • Hi,

    have a look at http://msdn.microsoft.com/en-us/library/cc433482(v=EXCHG.80).aspx, section 2.2.2.19.

    This message contains the PR_Searchkey value of the original message. You can correlate the existing mail to the report via this property.

    Kind regards,
    Henning Krause

    "BagpussUK" wrote in message news:482e9fe4-21ed-48e0-9234-898cb0c2be8d@communitybridge.codeplex.com...

    Hi there

    Was wondering if it is possible to get the message (i assume from sent items) that a received read receipt refers to? I found out that I can use the ItemClass property to determine if the message is a read receipt but I need to be able retrieve the message it refers to so i can perform some actions elsewhere in my code.

    Many thanks

    James Slade

    Monday, June 27, 2011 3:28 PM
  • Thanks for the reply. I'm a bit of a noob to EWS and i got a bit lost in that link you sent me. Below is the code i was using to attempt to find the message in the sent items. The search returns 0 items. Any help would be appriciated!
     
    using EWS = Microsoft.Exchange.WebServices.Data;
    
    ...<br/><br/>EWS.EmailMessage boundEmail = EWS.EmailMessage.Bind(m_ExchangeService, syncEmailMessage.Id);
    EWS.SearchFilter filter = new EWS.SearchFilter.IsEqualTo(EWS.EmailMessageSchema.InternetMessageId, boundEmail.InReplyTo); 
    EWS.ItemView view = new EWS.ItemView(512);
    
    var search = m_ExchangeService.FindItems(EWS.WellKnownFolderName.SentItems, filter, view);
    
    James
    Monday, June 27, 2011 4:28 PM
  • Hi,

    here you go:
    http://www.infinitec.de/post/2011/06/27/Correlating-a-Non-Delivery-Notification-to-its-original-message-with-the-Exchange-Managed-API.aspx

    Kind regards,
    Henning Krause

    "BagpussUK" wrote in message news:f6f35f71-874e-41e4-90ea-f822b5a8c143@communitybridge.codeplex.com...  Thanks for the reply. I'm a bit of a noob to EWS and i got a bit lost in that link you sent me. Below is the code i was using to attempt to find the message in the sent items. The search returns 0 items. Any help would be appriciated!

    using EWS = Microsoft.Exchange.WebServices.Data;
    
    ...<br/><br/>EWS.EmailMessage boundEmail =
    EWS.EmailMessage.Bind(m_ExchangeService, syncEmailMessage.Id);
    EWS.SearchFilter filter = new
    EWS.SearchFilter.IsEqualTo(EWS.EmailMessageSchema.InternetMessageId,
    boundEmail.InReplyTo);
    EWS.ItemView view = new EWS.ItemView(512);
    
    var search = m_ExchangeService.FindItems(EWS.WellKnownFolderName.SentItems,
    filter, view);
    

    James

    • Marked as answer by BagpussUK Tuesday, June 28, 2011 7:40 AM
    Monday, June 27, 2011 6:12 PM
  • Wow! Thanks a lot!

    Cheers

    James

    Tuesday, June 28, 2011 7:40 AM