0 votes
imap.SelectInbox();
if (imap.Search(Flag.UnSeen).Count > 0)
{
    foreach (long uid in imap.Search(Flag.UnSeen))
    {
        var eml = imap.GetMessageByUID(uid);
        IMail email = new MailBuilder().CreateFromEml(eml);

        Bounce bounce = new Bounce();
        List<BounceResult> results = bounce.ExamineAll(email);

        // Here results is alaways 0
related to an answer for: Bounce not working as expected
by

1 Answer

0 votes

Are you sure there are bounce reports (failed Delivery Status Notifications) in your mailbox?

Usually such emails have a subject similar to "Delivery Status Notification (Failed)".

If there are, and Mail.dll's Bounce class fails to recognize them, please send those to us for examination.

Easiest way would be to simply send an email, with such email attached (zipped) to support address (you can find it in the page footer below).

You can find details how to do that here:
https://www.limilabs.com/blog/i-have-problems-parsing-the-message

P.S.
Your code performs server search twice.
There is no need for this check:

if (imap.Search(Flag.UnSeen).Count > 0)
by (301k points)
edited by
...