CkEmailBundle Ruby Programming Reference Documentation
CkEmailBundle
Represents a collection of Email objects.
Object Creation
obj = Chilkat::CkEmailBundle.new()
Properties
# str is a CkString object (output) LastErrorHtml( str )
Error information in HTML format for the last method called.
# str is a CkString object (output) LastErrorText( str )
Error information in plain-text format for the last method called.
# str is a CkString object (output) LastErrorXml( str )
Error information in XML format for the last method called.
# Returns an integer value get_MessageCount( )
The number of emails in this bundle.
# Returns a boolean value get_Utf8( )
# b is a boolean (input) put_Utf8( 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
# email is a CkEmail object (input) # Returns a boolean value AddEmail( email )
Adds an Email object to the bundle. Returns true if successful
# name is a string (input) # value is a string (input) # Returns a CkEmail object FindByHeader( name, value )
To be documented soon...
# index is an integer (input) # Returns a CkEmail object GetEmail( index )
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( )
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
# sbXml is a CkString object (output) GetXml( 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.
# filename is a string (input) # Returns a boolean value LoadXml( filename )
Loads an email bundle from an XML file.
# xmlStr is a string (input) # Returns a boolean value LoadXmlString( xmlStr )
Loads an email bundle from an XML string.
# email is a CkEmail object (input) # Returns a boolean value RemoveEmail( email )
Removes an email from the bundle. This does not remove the email from the mail server.
# index is an integer (input) # Returns a boolean value RemoveEmailByIndex( index )
Removes the Nth email in a bundle. (Indexing begins at 0.) Returns true for success, false for failure.
# filename is a string (input) # Returns a boolean value SaveLastError( filename )
Saves the last error information to an XML formatted file.
# filename is a string (input) # Returns a boolean value SaveXml( 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
# ascending is a boolean (input) SortByDate( ascending )
Sorts emails in the bundle by date.
# ascending is a boolean (input) SortByRecipient( ascending )
Sorts emails in the bundle by recipient.
# ascending is a boolean (input) SortBySender( ascending )
Sorts emails in the bundle by sender.
# ascending is a boolean (input) SortBySubject( ascending )
Sorts emails in the bundle by subject.
# Returns a string getXml( )
Converts the email bundle to an XML document in memory. Returns the XML document as a string.
# Returns a string lastErrorHtml( )
Error information in HTML format for the last method called.
# Returns a string lastErrorText( )
Error information in plain-text format for the last method called.
# Returns a string lastErrorXml( )
Error information in XML format for the last method called.
|