0 votes

Hi i am trying to parse emails from a google account and my problem is that when i recieve a Read Receipt the GmailThreadID is different than the original email. So do you have any solution on how can i check a read receipt to which stored message belongs.
Actually i kind of create my custom ThreadID

by (790 points)

1 Answer

+1 vote

ThreadID is a google specific thing assigned by the IMAP server. Read receipts are usually generated by the client applications. I don't think any email client is reporting this thread id back in the receipt itself.

You can however get the original message-id using OriginalMessageID property:

var eml = imap.GetMessageByUID(uid);
IMail email = new MailBuilder().CreateFromEml(eml);
MimeMessageDispositionNotification mdn = email.ReadReceipts[0];

string finalRecipient = mdn.FinalRecipient; 
      // recipient@example.com

DispositonActionMode actionmode = mdn.ActionMode; 
      // e.g. DispositonActionMode.ManualAction

DispositonSendingMode sendingMode = mdn.SendingMode; 
      // e.g. DispositonSendingMode.SentManually

string originalMessageID= mdn.OriginalMessageID; 
      // e.g. "message-id@original.com"

DispositonType dispositionType = mdn.Type; 
      // e.g. DispositonType.Displayed, DispositonType.Deleted
by (297k points)
Any tip for out of office messages?
...