ChilkatEmailBundle2 ActiveX Reference (Visual Basic)

ChilkatEmailBundle2

Represents a collection of Email objects.

Properties

LastErrorHtml As String (read-only)

Error information in HTML format for the last method called.

LastErrorText As String (read-only)

Error information in plain-text format for the last method called.

LastErrorXml As String (read-only)

Error information in XML format for the last method called.

MessageCount As Long (read-only)

The number of emails in this bundle.

Methods

AddEmail(email As ChilkatEmail2)

Adds an Email object to the bundle. Returns true if successful

GetEmail(index As Long) As ChilkatEmail2

Returns the Nth Email in the bundle.

GetUidls() As CkStringArray

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.

GetXml() As String

Converts the email bundle to an XML document in memory. Returns the XML document as a string.

Returns a null on failure

LoadXml(filename As String) As Long

Loads an email bundle from an XML file.

LoadXmlString(str As String) As Long

Loads an email bundle from an XML string.

RemoveEmail(email As ChilkatEmail2) As Long

Removes an email from the bundle. This does not remove the email from the mail server.

RemoveEmailByIndex(index As Long) As Long

Removes the Nth email in a bundle. (Indexing begins at 0.)

Returns 1 for success, 0 for failure.

SaveLastError(filename As String) As Long

Saves the last error information to an XML formatted file.

SaveXml(filename As String) As Long

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

SortByDate(ascending As Long)

Sorts emails in the bundle by date.

SortByRecipient(ascending As Long)

Sorts emails in the bundle by recipient.

SortBySender(ascending As Long)

Sorts emails in the bundle by sender.

SortBySubject(ascending As Long)

Sorts emails in the bundle by subject.