Provides properties and methods for connecting to a POP3 server and downloading and deleting e-mail messages from a user account inbox.
For a list of all members of this type, see Pop3 Members.
System.Object
MailBee.InternalUse.LengthyTaskEventSink
MailBee.InternalUse.SocketEventSink
MailBee.InternalUse.SessionProtocolEventSink
MailBee.InternalUse.Pop3EventSink
MailBee.Pop3Mail.Pop3
Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.
You can perform the following operations using this class:
This sample connects to a POP3 server, logs in using the most secure method supported by this server, downloads headers for the first 10 messages in the inbox, and prints From:, To:, and Subject: field values for every message into Console.
[C#] // To use the code below, import MailBee namespaces at the top of your code using MailBee; using MailBee.Pop3Mail; using MailBee.Mime; // The actual code (put it into a method of your class). Pop3 pop = new Pop3(); pop.Connect("mail.domain.com"); pop.Login("jdoe", "secret"); MailMessageCollection msgs = pop.DownloadMessageHeaders(1, 10); foreach (MailMessage msg in msgs) { Console.WriteLine("From: " + msg.From.Email + ", To: " + msg.To.AsString + ", Subject: " + msg.Subject); } pop.Disconnect();
[Visual Basic] ' To use the code below, import MailBee namespaces at the top of your code Imports MailBee Imports MailBee.Pop3Mail Imports MailBee.Mime ' The actual code (put it into a method of your class). Dim pop As New Pop3 pop.Connect("mail.domain.com") pop.Login("jdoe", "secret") Dim msgs As MailMessageCollection = pop.DownloadMessageHeaders(1, 10) For Each msg As MailMessage In msgs Console.WriteLine("From: " & msg.From.Email & ", To: " & msg.To.AsString & ", Subject: " & msg.Subject) Next pop.Disconnect()
Namespace: MailBee.Pop3Mail
Assembly: MailBee.NET (in MailBee.NET.dll)
Pop3 Members | MailBee.Pop3Mail Namespace