ChilkatEmailBundle2 ActiveX Reference
ChilkatEmailBundle2
Represents a collection of Email objects.
Object Creation
(Visual Basic 6.0)
Dim obj As New ChilkatEmailBundle2
(ASP)
set obj = Server.CreateObject("Chilkat.EmailBundle")
(VBScript)
set obj = CreateObject("Chilkat.EmailBundle")
(Delphi)
obj := TChilkatEmailBundle2.Create(Self);
(FoxPro)
loObject = CreateObject('Chilkat.EmailBundle')
(SQL Server)
EXEC @hr = sp_OACreate 'Chilkat.EmailBundle', @obj OUT
(Javascript)
var obj = new ActiveXObject("Chilkat.EmailBundle");
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
AddMime(mime As Variant) As Long
To be documented soon...
FindByHeader(name As String, value As String) As ChilkatEmail2
To be documented soon...
GetEmail(index As Long) As ChilkatEmail2
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 a null reference on failure
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. Returns a null reference on failure
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.
|