LibY!Mail  0.20
A .NET object oriented hierarchical encapsulation of the Yahoo! Mail web services.
Account Class Reference

The main access point of this library. Describes the account, the folders and the messages in the account. More...

Inheritance diagram for Account:

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
 

Detailed Description

The main access point of this library. Describes the account, the folders and the messages in the account.

Constructor & Destructor Documentation

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!.

Parameters
tokenThe token received from the Yahoo! Web Authentication page
appIDThe Application ID you received when you registered your application with Yahoo!.
secretThe shared secret

Member Function Documentation

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.

Parameters
refreshtrue 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

Returns
A UserPreferences object filled with the account settings of the user.
void InitFolders ( Boolean  resetMessageUnseen)

Retrieve the list of folders from the server, and the messages in each folder.

Parameters
resetMessageUnseenReset 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

Parameters
messageThe message to send
saveCopytrue to save a copy of the message in the "Sent" folder, false to not save a copy.
Returns
The new YMailMessage created for the sent message, if saveCopy is true, null otherwise.

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.

Property Documentation

FolderCollection Folders
get

Gets the folders in this account

Returns null if InitFolders was not called yet.


The documentation for this class was generated from the following file: