TChilkatEmailBundle2 Delphi Reference
TChilkatEmailBundle2
Represents a collection of Email objects.
Object Creation
var
obj: CHILKATMAILLib2_TLB.IChilkatEmailBundle2;
(or)
obj: CHILKATIMAPLib_TLB.IChilkatEmailBundle2;
...
begin
obj := CoChilkatEmailBundle2.Create();
Properties
property LastErrorHtml: WideString readonly
Error information in HTML format for the last method called.
property LastErrorText: WideString readonly
Error information in plain-text format for the last method called.
property LastErrorXml: WideString readonly
Error information in XML format for the last method called.
property MessageCount: Integer readonly
The number of emails in this bundle.
Methods
procedure AddEmail(email: TChilkatEmail2);
Adds an Email object to the bundle. Returns true if successful
function AddMime(mime: OleVariant): Integer;
To be documented soon...
function FindByHeader(name: WideString, value: WideString): TChilkatEmail2;
To be documented soon...
function GetEmail(index: Integer): TChilkatEmail2;
Returns the Nth Email in the bundle. Returns a null reference on failure
function GetUidls(): TCkStringArray;
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
function GetXml(): WideString;
Converts the email bundle to an XML document in memory. Returns the XML document as a string. Returns a null on failure
function LoadXml(filename: WideString): Integer;
Loads an email bundle from an XML file.
function LoadXmlString(str: WideString): Integer;
Loads an email bundle from an XML string.
function RemoveEmail(email: TChilkatEmail2): Integer;
Removes an email from the bundle. This does not remove the email from the mail server.
function RemoveEmailByIndex(index: Integer): Integer;
Removes the Nth email in a bundle. (Indexing begins at 0.) Returns 1 for success, 0 for failure.
function SaveLastError(filename: WideString): Integer;
Saves the last error information to an XML formatted file.
function SaveXml(filename: WideString): Integer;
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
procedure SortByDate(ascending: Integer);
Sorts emails in the bundle by date.
procedure SortByRecipient(ascending: Integer);
Sorts emails in the bundle by recipient.
procedure SortBySender(ascending: Integer);
Sorts emails in the bundle by sender.
procedure SortBySubject(ascending: Integer);
Sorts emails in the bundle by subject.
|