#include <Message.h>
This class offers a way for applications to retrieve the content of an email message.
Note that no manipulation to the actual message on the server is done through this class. To manipulate the messages, use the Folder class.
Public Member Functions | |
Message (Mailbox &mailbox, String url) | |
Constructor. | |
~Message () | |
Destructor. | |
String | getUrl () const |
Gets the url used to access this message. | |
String | getID () const |
Gets the ID of the message. | |
bool | isLoaded () const |
Determines if the content of the message has been loaded. | |
bool | isRead () const |
Determines if the message is marked as read on the server. | |
int | getContentLength () const |
Gets the length of the message in bytes. | |
String | getFrom () const |
Gets the name or email address of the entity that sent this message. | |
String | getSubject () const |
Gets the subject of the message. | |
util::DateTime | getDate () const |
Gets the date of the message (the date the server received it). | |
const Buffer | getContent () const |
Gets the content of the message. | |
void | setUrl (String url) |
Gets the url used to access this message. | |
void | setRead (bool read) |
Sets if the message is marked as read on the server. | |
void | setContentLength (int length) |
Sets the content length of the message. | |
void | setFrom (String from) |
Sets the from entity of the message. | |
void | setSubject (String subject) |
Sets the subject of the message. | |
void | setDate (util::DateTime date) |
Sets the received date of the message. | |
void | load () |
Loads the message content into memory. | |
void | unload () |
Unloads the message content from memory. |
|
Constructor.
|
|
Destructor.
|
|
Gets the url used to access this message.
|
|
Gets the ID of the message. Each mail message has its own unique ID given to it by the server. |
|
Determines if the content of the message has been loaded.
|
|
Determines if the message is marked as read on the server.
|
|
Gets the length of the message in bytes.
|
|
Gets the name or email address of the entity that sent this message. If a textual name is provided, that is returned, otherwise, the email address is returned. |
|
Gets the subject of the message.
|
|
Gets the date of the message (the date the server received it).
|
|
Gets the content of the message. The message must have been previously loaded in order for this to return valid data. |
|
Gets the url used to access this message.
|
|
Sets if the message is marked as read on the server. This does NOT change the actual status of the message on the server. To do that, call Folder::setMessageRead() on the folder where this message resides. |
|
Sets the content length of the message. This only affects the value returned by getContentLength(). |
|
Sets the from entity of the message. This only affects the value returned by getFrom(). |
|
Sets the subject of the message. This only affects the value returned by getSubject(). |
|
Sets the received date of the message. This only affects the value returned by getDate(). |
|
Loads the message content into memory.
|
|
Unloads the message content from memory.
|