Replies: 1 comment 4 replies
-
The In other words, if you are trying to get the MimeMessage that is being referenced, you would search for the message that has a var email = await inbox.SearchAsync (SearchQuery.HeaderContains ("Message-ID", "<" + messageId + ">")); This, of course, assumes that the referenced message exists in the INBOX folder (which it probably doesn't if you are trying to find the message that was sent because it'd probably be in a "Sent" folder). Let me ask you this: why do you need the original message? If I was writing an automated system that did this sort of thing, the only purpose for me would be to verify that this Delivery Status Notification email wasn't fraudulent. But I could likely do that better & more efficiently if I saved the info I needed in a database as opposed to caring at all about the original message. |
Beta Was this translation helpful? Give feedback.
-
Hi, I am implementing a functionality that sends a list of emails and I need to check if any were not delivered. I have followed these instructions https://stackoverflow.com/questions/48118781/asp-net-mailkit-smtp-response and I already get the failed email when one is not delivered, but since it is an email list that is sent, how do you know which one it corresponds to? I could see that the delivery status notification emails include in the header a reference that matches the messageId, but when I try to search for emails with that reference I only get an empty list.
It is the first time I implement something similar, I have never worked with emails, I appreciate any help or correction
Beta Was this translation helpful? Give feedback.
All reactions