LibY!Mail
0.20
A .NET object oriented hierarchical encapsulation of the Yahoo! Mail web services.
|
The main access point of this library. Describes the account, the folders and the messages in the account. More...
Public Member Functions | |
Account (String token, String appID, String secret) | |
Initialize a new instance of the Account class, with the required token , appID and secret received from Yahoo!. | |
void | Dispose () |
Releases all resources used by this class | |
void | FetchExternalMail (Boolean refresh) |
Fetch email messages from all external accounts defined in the user preferences. | |
UserPreferences | GetUserPreferences () |
Gets the account preferences of the user | |
void | InitFolders (Boolean resetMessageUnseen) |
Retrieve the list of folders from the server, and the messages in each folder. | |
YMailMessage | SendMessage (MailMessage message, Boolean saveCopy) |
Send a mail message using the Yahoo! Mail account | |
Properties | |
FolderCollection | Folders [get] |
Gets the folders in this account | |
The main access point of this library. Describes the account, the folders and the messages in the account.
Account | ( | String | token, |
String | appID, | ||
String | secret | ||
) |
Initialize a new instance of the Account class, with the required token , appID and secret received from Yahoo!.
token | The token received from the Yahoo! Web Authentication page |
appID | The Application ID you received when you registered your application with Yahoo!. |
secret | The shared secret |
void Dispose | ( | ) |
Releases all resources used by this class
Currently, only the intenal timer that renews the WSSID is disposed.
void FetchExternalMail | ( | Boolean | refresh | ) |
Fetch email messages from all external accounts defined in the user preferences.
refresh | true to refresh the messages in the folders defined to receive the messages for each external account. |
If the user preferences were not received yet by calling GetUserPreferences, that method will be called before the external mail is fetched.
If refresh is true, only folders who's respective external accounts were fetched without errors are refreshed. In this case, the messages will be retrieved in ascending order, ordered by date. To retrieve the messages in a different order, set refresh as false and call Folder.ListMessages(SortKey, SortOrder, Filter) yourself with the desired sorting.
UserPreferences GetUserPreferences | ( | ) |
Gets the account preferences of the user
void InitFolders | ( | Boolean | resetMessageUnseen | ) |
Retrieve the list of folders from the server, and the messages in each folder.
resetMessageUnseen | Reset unseen messages icon in Yahoo! Messenger. |
This method must be called at least once before messages can be accessed.
Calling this method resets the FolderCollection returned from the Folders property, and all of the messages in the folders it contains.
YMailMessage SendMessage | ( | MailMessage | message, |
Boolean | saveCopy | ||
) |
Send a mail message using the Yahoo! Mail account
message | The message to send |
saveCopy | true to save a copy of the message in the "Sent" folder, false to not save a copy. |
The returned message will not have the content of the sent message. If you chose to save a copy of the message, you can get it's content by calling Folder.GetMessageContent from the "Sent" folder.
|
get |
Gets the folders in this account
Returns null if InitFolders was not called yet.