Provides properties and methods for managing and examining the collection of MailMessage objects.
For a list of all members of this type, see MailMessageCollection Members.
System.Object
System.Collections.CollectionBase
MailBee.Mime.MailMessageCollection
Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.
This collection is not read-only. You can add messages to this collection using Add method and reverse the collection using Reverse method. Reverse method is useful if you have received a list of messages from the mail server (for instance, using DownloadMessageHeaders method) and new messages appear last in this list. To make newer messages be listed first, call Reverse on the returned collection.
This sample loads the message from .EML file and adds this message to a new collection.
[C#] // To use the code below, import MailBee namespaces at the top of your code. using MailBee; using MailBee.Mime; // The actual code (put it into a method of your class). MailMessage msg = new MailMessage(); msg.LoadMessage(@"C:\Docs\TestMail.eml"); MailMessageCollection msgColl = new MailMessageCollection(); msgColl.Add(msg);
[Visual Basic] ' To use the code below, import MailBee namespaces at the top of your code. Imports MailBee Imports MailBee.Mime ' The actual code (put it into a method of your class). Dim msg As New MailMessage msg.LoadMessage("C:\Docs\TestMail.eml") Dim msgColl = New MailMessageCollection msgColl.Add(msg)
Namespace: MailBee.Mime
Assembly: MailBee.NET (in MailBee.NET.dll)
MailMessageCollection Members | MailBee.Mime Namespace | MailMessage