CkEmailBundle C++ Class Reference (Visual C++)
CkEmailBundle
Represents a collection of Email objects.
Properties
void LastErrorHtml(CkString &str);
Error information in HTML format for the last method called.
void LastErrorText(CkString &str);
Error information in plain-text format for the last method called.
void LastErrorXml(CkString &str);
Error information in XML format for the last method called.
long get_MessageCount(void);
The number of emails in this bundle.
bool get_Utf8(void) const; void put_Utf8(bool b);
When set to true, all "const char *" arguments are expected to be utf-8 strings. If set to false, the "const char *" arguments are expected to be ANSI strings.
Methods
bool AddEmail(const CkEmail * email);
Adds an Email object to the bundle. Returns true if successful
bool AddEmail(const CkEmail & email);
Adds an Email object to the bundle. Returns true if successful
CkEmail * GetEmail(long index);
Returns the Nth Email in the bundle.
CkStringArray * GetUidls();
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.
void GetXml(CkString & sbXml);
Converts the email bundle to an XML document in memory. Returns the XML document as a string. Returns true for success, false for failure.
bool LoadXml(const char * filename);
Loads an email bundle from an XML file.
bool LoadXmlString(const char * xmlStr);
Loads an email bundle from an XML string.
bool RemoveEmail(const CkEmail * email);
Removes an email from the bundle. This does not remove the email from the mail server.
bool RemoveEmail(const CkEmail & email);
Removes an email from the bundle. This does not remove the email from the mail server.
bool SaveLastError(const char * filename);
Saves the last error information to an XML formatted file.
bool SaveXml(const char * filename);
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
void SortByDate(bool ascending);
Sorts emails in the bundle by date.
void SortByRecipient(bool ascending);
Sorts emails in the bundle by recipient.
void SortBySender(bool ascending);
Sorts emails in the bundle by sender.
void SortBySubject(bool ascending);
Sorts emails in the bundle by subject.
const char * getXml();
Converts the email bundle to an XML document in memory. Returns the XML document as a string.
const char * lastErrorHtml();
Error information in HTML format for the last method called.
const char * lastErrorText();
Error information in plain-text format for the last method called.
const char * lastErrorXml();
Error information in XML format for the last method called.
|