Chilkat VB.NET EmailBundle Class Reference
EmailBundle
Represents a collection of Email objects.
Object Creation
(C#)
Chilkat.EmailBundle obj = new Chilkat.EmailBundle();
(VB.NET)
Dim obj As New Chilkat.EmailBundle()
Properties
LastErrorHtml As String (ReadOnly)
Error information in HTML format for the last method called.
LastErrorText As String (ReadOnly)
Error information in plain-text format for the last method called.
LastErrorXml As String (ReadOnly)
Error information in XML format for the last method called.
MessageCount As Integer (ReadOnly)
The number of emails in this bundle.
Methods
Function AddEmail(ByVal email As Email) As Boolean
Adds an Email object to the bundle. Returns true if successful
Function FindByHeader(ByVal name As String, ByVal value As String) As Email
To be documented soon...
Function GetEmail(ByVal index As Integer) As Email
Returns the Nth Email in the bundle. The email returned is a copy of the email in the bundle. Updating the email object returned by GetEmail has no effect on the email within the bundle. To update/replace the email in the bundle, your program should call GetEmail to get a copy, make modifications, call RemoveEmailByIndex to remove the email (passing the same index used in the call to GetEmail), and then call AddEmail to insert the new/modified email into the bundle. Returns Nothing on failure
Function GetUidls() As StringArray
Returns a StringArray object containing UIDLs for all Email objects in the bundle. UIDLs are only valid for emails retrieved from POP3 servers. An email on a POP3 server has a "UIDL", an email on IMAP servers has a "UID". If the email was retrieved from an IMAP server, the UID will be accessible via the "ckx-imap-uid" header field. Returns Nothing on failure
Function GetXml() As String
Converts the email bundle to an XML document in memory. Returns the XML document as a string. Returns Nothing on failure
Function LoadXml(ByVal filename As String) As Boolean
Loads an email bundle from an XML file.
Function LoadXmlString(ByVal xmlStr As String) As Boolean
Loads an email bundle from an XML string.
Function RemoveEmail(ByVal email As Email) As Boolean
Removes an email from the bundle. This does not remove the email from the mail server.
Function RemoveEmailByIndex(ByVal index As Integer) As Boolean
Removes the Nth email in a bundle. (Indexing begins at 0.) Returns true for success, false for failure.
Function SaveLastError(ByVal filename As String) As Boolean
Saves the last error information to an XML formatted file.
Function SaveXml(ByVal filename As String) As Boolean
Converts each email to XML and persists the bundle to an XML file. The email bundle can later be re-instantiated by calling MailMan.LoadXmlFile
Sub SortByDate(ByVal ascending As Boolean)
Sorts emails in the bundle by date.
Sub SortByRecipient(ByVal ascending As Boolean)
Sorts emails in the bundle by recipient.
Sub SortBySender(ByVal ascending As Boolean)
Sorts emails in the bundle by sender.
Sub SortBySubject(ByVal ascending As Boolean)
Sorts emails in the bundle by subject.
|