ComponentPro UltimateBounceInspector

      BounceInspector Class

      See AlsoMembersMembers Options: Show AllLanguage Filter: AllSend comments on this topic to ComponentPro
      BounceInspector helps you to process bounced e-mail messages, sort them out into e-mails into categories such as: AntiSpam, AutoReply, Hard, Soft, etc. BounceInspector can load messages from many sources such as EML files, MSG(MS Outlook) files, MailMessage objects, IMAP inbox and POP3 inbox. With BounceInspector, you will be able to delete hard bounced e-mail from disk, IMAP or POP3 inbox on the fly with a few lines of code. You can use the Processed event to capture the returned information and use it to update your database, display, etc... See the BounceResult for more information.

      Syntax

      public class BounceInspector : Component

      Examples

      Shows how to process mail messages on a local disk.

      using System;
      using ComponentPro.Net.Mail;
      
      ...
      
      // Create a new instance of the BounceInspector class.
      BounceInspector inspector = new BounceInspector();
      
      // Process all EML files in directory 'c:\\temp'.
      BounceResultCollection result = inspector.ProcessMessages("c:\\temp");
      
      // Display processed emails. 
      foreach (BounceResult r in result)
      {
          // If this message was identified as a bounced email message. 
          if (r.Identified)
          {
              // Print out the result 
              Console.Write("FileName: {0}\nSubject: {1}\nAddress: {2}\n" + 
                            "Bounce Category: {3}\n" + 
                            "Bounce Type: {4}\nDeleted: {5}\n" + 
                            "DSN Action: {6}\n" + 
                            "DSN Diagnostic Code: {7}\n\n",
                              System.IO.Path.GetFileName(r.FilePath),
                              r.MailMessage.Subject,
                              r.Addresses[0],
                              r.BounceCategory.Name,
                              r.BounceType.Name,
                              r.FileDeleted,
                              r.Dsn.Action,
                              r.Dsn.DiagnosticCode);
          }
      }
      
      Console.WriteLine("{0} bounced message found", result.BounceCount);

      Inheritance Hierarchy

               ComponentPro.Net.Mail.ComponentPro.Net.Mail.BounceInspector

      Framework

      .NET Compact Framework.NET Compact Framework

      Supported version: 2.0, 3.5, and 3.9
      Assembly: ComponentPro.BounceInspector.CF (in ComponentPro.BounceInspector.CF.dll)

      .NET Framework.NET Framework

      Supported version: 2.0, 3.0, 3.5, 4.0, 4.5.x, 4.6.x and later
      Assembly: ComponentPro.BounceInspector (in ComponentPro.BounceInspector.dll)

      Xamarin AndroidXamarin Android

      Supported version: 2.3 and later
      Assembly: ComponentPro.BounceInspector.Android (in ComponentPro.BounceInspector.Android.dll)

      Xamarin MacXamarin Mac

      Supported version: 2.0.x and later
      Assembly: ComponentPro.BounceInspector.Mac (in ComponentPro.BounceInspector.Mac.dll)

      Xamarin iOSXamarin iOS

      Supported version: 5.1.x and later
      Assembly: ComponentPro.BounceInspector.iOS (in ComponentPro.BounceInspector.iOS.dll)

      See Also