LibY!Mail
0.20
A .NET object oriented hierarchical encapsulation of the Yahoo! Mail web services.
|
Describes a folder of messages in the mail account. More...
Public Member Functions | |
void | FlagMessages (YMailMessage[] messages, MessageFlags flags, Filter filter) |
Flag messages in this folder that match filter with the specified flags . | |
UInt64 | GetMessageContent (MessageRequest[] requests, String charset, UInt32 truncateAt) |
Retrieve the content of a message from the server. | |
YMailMessage | ImportMessage (String content) |
Load a Base64 encoded message to the folder on the server | |
void | ListMessages (SortKey sortKey, SortOrder sortOrder, Filter filter) |
Fill the YMailMessages collection with messages in this folder. | |
YMailMessage | SaveMessage (MailMessage message) |
Save a new message in a folder | |
Properties | |
Boolean | IsSystem [get] |
Gets a value indicating if this is a predefined system folder. | |
String | Name [get, set] |
Gets or set the name of the folder | |
UInt64 | Size [get] |
Gets the size, in bytes, of the folder. | |
UInt64 | TotalCount [get] |
Gets the total number of messages in the folder. | |
UInt64 | UnreadCount [get] |
Gets the number of unread messages in this folder. | |
YMailMessageCollection | YMailMessages [get] |
Gets the collection of messages in this folder | |
Describes a folder of messages in the mail account.
Encapsulates the Yahoo! Mail Web Services Fid and FolderData tata types.
void FlagMessages | ( | YMailMessage[] | messages, |
MessageFlags | flags, | ||
Filter | filter | ||
) |
Flag messages in this folder that match filter with the specified flags .
messages | List of messages to flag |
flags | A bitwise OR of flags to set on the messages |
filter | A bitwise OR of filtering terms to use on messages before the flags are set. |
MessageErrorException | There were errors setting flags for some messages. |
UInt64 GetMessageContent | ( | MessageRequest[] | requests, |
String | charset, | ||
UInt32 | truncateAt | ||
) |
Retrieve the content of a message from the server.
requests | An array of MessageRequest objects for each message. |
charset | The messages character set |
truncateAt | Number of bytes to begin trancation of the message |
The requests array should be composed of MessageRequest objects returned from the YMailMessage.GetMessageRequest method of each message for which the content is to be retrieved.
YMailMessage ImportMessage | ( | String | content | ) |
Load a Base64 encoded message to the folder on the server
content | The content of the message, including headers and attachments. |
The returned message will not include the content of the message you loaded. To get the message content, call the GetMessageContent method.
You can use this method e.g. for importing messages from another email client to Yahoo! Mail, if the other client can save the message to a file you can encode.
Fill the YMailMessages collection with messages in this folder.
sortKey | The property to sort the messages by |
sortOrder | The order to sort the message by, ascending or descending |
filter | A bitwise OR of Filter members to use as filter for the messages retrieved. |
Calling this method invalidates the message collection available from the YMailMessages property, and fills it with new messages retrieved from the Yahoo! Mail server for this folder.
YMailMessage SaveMessage | ( | MailMessage | message | ) |
Save a new message in a folder
message | The message to save |
You can use this method e.g. for saving draft messages in the "drafts" folder.
The returned YMailMessage will not include the content of the message parameter. In order to get the message content, you should call the GetMessageContent method.
|
get |
Gets a value indicating if this is a predefined system folder.
true if this is a system folder, false if this is a user-defined folder.
|
getset |
Gets or set the name of the folder
Setting a new name calls the Yahoo! Mail Web Services RenameFolder web service, so this may take a while.
InvalidOperationException | Trying to set a new name and the IsSystem property is true. |
|
get |
Gets the size, in bytes, of the folder.
The total size of all messages in the folder.
|
get |
Gets the total number of messages in the folder.
This value is returned from the ListFolders web service, and should be the same as CollectionBase.Count for the collection returned from YMailMessages.
|
get |
Gets the number of unread messages in this folder.
|
get |
Gets the collection of messages in this folder
On the first access to this property, the messages for this folder are retrieved from the Yahoo! Mail server, so this can take a while.