{"id":3876,"date":"2013-03-27T13:00:33","date_gmt":"2013-03-27T11:00:33","guid":{"rendered":"http:\/\/www.limilabs.com\/blog\/?p=3876"},"modified":"2014-04-15T14:17:22","modified_gmt":"2014-04-15T12:17:22","slug":"processing-read-receipt-mdn","status":"publish","type":"post","link":"https:\/\/www.limilabs.com\/blog\/processing-read-receipt-mdn","title":{"rendered":"Processing a read receipt (MDN)"},"content":{"rendered":"<div class=\"well\">\nYou can also read how to: <\/p>\n<ul>\n<li><a href=\"\/blog\/requesting-read-receipt\">Request a read receipt<\/a><\/li>\n<li><a href=\"\/blog\/creating-read-receipt-mdn\">Create a read receipt<\/a><\/li>\n<li>Process a read receipt<\/li>\n<\/ul>\n<\/div>\n<p>In this article we&#8217;ll show how to process a read receipt.<\/p>\n<p>Read receipts also known as MDNs or Message Delivery Notifications are used to notify the message sender that some action has happened with their message (it was displayed, processed, deleted)<\/p>\n<p>All MDNs for a received message are available through <em>IMail.ReadReceipts<\/em> property.<\/p>\n<pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\r\n\/\/ C#\r\n\r\nvar eml = imap.GetMessageByUID(uid);\r\nIMail email = new MailBuilder().CreateFromEml(eml);\r\nMimeMessageDispositionNotification mdn = email.ReadReceipts&#x5B;0];\r\n\r\nstring finalRecipient = mdn.FinalRecipient; \r\n      \/\/ recipient@example.com\r\n\r\nDispositonActionMode actionmode = mdn.ActionMode; \r\n      \/\/ e.g. DispositonActionMode.ManualAction\r\n\r\nDispositonSendingMode sendingMode = mdn.SendingMode; \r\n      \/\/ e.g. DispositonSendingMode.SentManually\r\n\r\nstring originalMessageID= mdn.OriginalMessageID; \r\n      \/\/ e.g. &quot;message-id@original.com&quot;\r\n\r\nDispositonType dispositionType = mdn.Type; \r\n      \/\/ e.g. DispositonType.Displayed, DispositonType.Deleted\r\n<\/pre>\n<pre class=\"brush: vb; title: ; notranslate\" title=\"\">\r\n' VB.NET\r\n\r\nDim eml = imap.GetMessageByUID(uid)\r\nDim email As IMail = New MailBuilder().CreateFromEml(eml)\r\nDim mdn As MimeMessageDispositionNotification = email.ReadReceipts(0)\r\n\r\nDim finalRecipient As String = mdn.FinalRecipient \r\n     ' recipient@example.com\r\n\r\nDim actionmode As DispositonActionMode = mdn.ActionMode \r\n      ' e.g. DispositonActionMode.ManualAction\r\n\r\nDim sendingMode As DispositonSendingMode = mdn.SendingMode \r\n      ' e.g. DispositonSendingMode.SentManually\r\n\r\nDim originalMessageID As String = mdn.OriginalMessageID \r\n      ' e.g. &quot;message-id@original.com&quot;\r\n\r\nDim dispositionType As DispositonType = mdn.Type \r\n      ' e.g. DispositonType.Displayed, DispositonType.Deleted\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>You can also read how to: Request a read receipt Create a read receipt Process a read receipt In this article we&#8217;ll show how to process a read receipt. Read receipts also known as MDNs or Message Delivery Notifications are used to notify the message sender that some action has happened with their message (it [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[15,33,95,57],"class_list":["post-3876","post","type-post","status-publish","format-standard","hentry","category-mail-dll","tag-c","tag-email-component","tag-mdn","tag-vb-net"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.limilabs.com\/blog\/wp-json\/wp\/v2\/posts\/3876"}],"collection":[{"href":"https:\/\/www.limilabs.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.limilabs.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.limilabs.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.limilabs.com\/blog\/wp-json\/wp\/v2\/comments?post=3876"}],"version-history":[{"count":15,"href":"https:\/\/www.limilabs.com\/blog\/wp-json\/wp\/v2\/posts\/3876\/revisions"}],"predecessor-version":[{"id":4530,"href":"https:\/\/www.limilabs.com\/blog\/wp-json\/wp\/v2\/posts\/3876\/revisions\/4530"}],"wp:attachment":[{"href":"https:\/\/www.limilabs.com\/blog\/wp-json\/wp\/v2\/media?parent=3876"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.limilabs.com\/blog\/wp-json\/wp\/v2\/categories?post=3876"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.limilabs.com\/blog\/wp-json\/wp\/v2\/tags?post=3876"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}