0

I am using Office 365 as email server.

I have already checked my server supports Dsn

I have implemented code in given in example.

Problem is that "Original-Envelope-Id" is always null.

I am sending unique Message id while sending through mailkit smtp client and receiving through imap client.

Is there some alternative to check message id of delivery notification email.

Like sending some headers which I can receive in delivery email.

ASP.NET MailKit SMTP response

Khalil
  • 1,047
  • 4
  • 17
  • 34
  • Can you provide a sample delivery status notification email that has a null Original-Envelope-Id? There are, afaik, no other headers that you can check or set. – jstedfast Feb 26 '20 at 13:30
  • I have emailed you email logs of smtp and imap – Khalil Feb 27 '20 at 11:20

1 Answers1

1

It looks like the delivery agent in your case decided to attach a text/rfc822-headers MIME part to the message instead of specifying the Original-Envelope-Id in the message/delivery-status MIME part content.

What you need to do is locate the TextRfc822Headers mime part and then check the headers.Message.MessageId property instead.

jstedfast
  • 35,744
  • 5
  • 97
  • 110