EmailFolder EmailFolder EmailFolder EmailFolder Class

Definition

Represents an email folder.

public : sealed class EmailFolder : IEmailFolderpublic sealed class EmailFolder : IEmailFolderPublic NotInheritable Class EmailFolder Implements IEmailFolder// You can use this class in JavaScript.
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

The Folder property returns an instance of this class.

Properties

DisplayName DisplayName DisplayName DisplayName

Gets or sets the display name for the folder.

public : PlatForm::String DisplayName { get; set; }public string DisplayName { get; set; }Public ReadWrite Property DisplayName As string// You can use this property in JavaScript.
Value
PlatForm::String string string string

The display name for the folder.

Id Id Id Id

Gets the ID of the email folder.

public : PlatForm::String Id { get; }public string Id { get; }Public ReadOnly Property Id As string// You can use this property in JavaScript.
Value
PlatForm::String string string string

The ID of the email folder.

IsSyncEnabled IsSyncEnabled IsSyncEnabled IsSyncEnabled

Gets or sets a Boolean value indicating if the folder is sync enabled.

public : PlatForm::Boolean IsSyncEnabled { get; set; }public bool IsSyncEnabled { get; set; }Public ReadWrite Property IsSyncEnabled As bool// You can use this property in JavaScript.
Value
PlatForm::Boolean bool bool bool

A Boolean value indicating if the folder is sync enabled.

Kind Kind Kind Kind

Gets the type of the folder such as inbox, outbox, drafts, sent, and so on.

public : EmailSpecialFolderKind Kind { get; }public EmailSpecialFolderKind Kind { get; }Public ReadOnly Property Kind As EmailSpecialFolderKind// You can use this property in JavaScript.
Value
EmailSpecialFolderKind EmailSpecialFolderKind EmailSpecialFolderKind EmailSpecialFolderKind

The type of the folder such as inbox, outbox, drafts, sent, and so on.

LastSuccessfulSyncTime LastSuccessfulSyncTime LastSuccessfulSyncTime LastSuccessfulSyncTime

Gets or sets the last time the folder was successfully synced with the server.

public : DateTime LastSuccessfulSyncTime { get; set; }public DateTimeOffset LastSuccessfulSyncTime { get; set; }Public ReadWrite Property LastSuccessfulSyncTime As DateTimeOffset// You can use this property in JavaScript.
Value
DateTime DateTimeOffset DateTimeOffset DateTimeOffset

The last time the folder was successfully synced with the server.

MailboxId MailboxId MailboxId MailboxId

Gets the ID of the mailbox that contains this folder.

public : PlatForm::String MailboxId { get; }public string MailboxId { get; }Public ReadOnly Property MailboxId As string// You can use this property in JavaScript.
Value
PlatForm::String string string string

The ID of the mailbox that contains this folder.

ParentFolderId ParentFolderId ParentFolderId ParentFolderId

Gets the ID of this folder's parent folder.

public : PlatForm::String ParentFolderId { get; }public string ParentFolderId { get; }Public ReadOnly Property ParentFolderId As string// You can use this property in JavaScript.
Value
PlatForm::String string string string

The ID of this folder's parent folder.

RemoteId RemoteId RemoteId RemoteId

Gets or sets the remote ID of the corresponding folder on the server.

public : PlatForm::String RemoteId { get; set; }public string RemoteId { get; set; }Public ReadWrite Property RemoteId As string// You can use this property in JavaScript.
Value
PlatForm::String string string string

The remote ID of the corresponding folder on the server.

Methods

CreateFolderAsync(String) CreateFolderAsync(String) CreateFolderAsync(String) CreateFolderAsync(String)

Asynchronously creates a new folder.

public : IAsyncOperation<EmailFolder> CreateFolderAsync(PlatForm::String name)public IAsyncOperation<EmailFolder> CreateFolderAsync(String name)Public Function CreateFolderAsync(name As String) As IAsyncOperation( Of EmailFolder )// You can use this method in JavaScript.
Parameters
name
PlatForm::String String String String

The name for the new folder.

Returns

DeleteAsync() DeleteAsync() DeleteAsync() DeleteAsync()

Asynchronously deletes this folder.

public : IAsyncAction DeleteAsync()public IAsyncAction DeleteAsync()Public Function DeleteAsync() As IAsyncAction// You can use this method in JavaScript.
Returns

An async action indicating that the operation has completed.

FindChildFoldersAsync() FindChildFoldersAsync() FindChildFoldersAsync() FindChildFoldersAsync()

Asynchronously finds the child folders of this folder.

public : IAsyncOperation<IVectorView<EmailFolder>> FindChildFoldersAsync()public IAsyncOperation<IReadOnlyList<EmailFolder>> FindChildFoldersAsync()Public Function FindChildFoldersAsync() As IAsyncOperation( Of IReadOnlyListEmailFolder )// You can use this method in JavaScript.
Returns
IAsyncOperation<IVectorView<EmailFolder>> IAsyncOperation<IReadOnlyList<EmailFolder>> IAsyncOperation<IReadOnlyList<EmailFolder>> IAsyncOperation<IReadOnlyList<EmailFolder>>

The list of child folders.

GetConversationReader() GetConversationReader() GetConversationReader() GetConversationReader()

Gets an instance of the EmailConversationReader class.

public : EmailConversationReader GetConversationReader()public EmailConversationReader GetConversationReader()Public Function GetConversationReader() As EmailConversationReader// You can use this method in JavaScript.
Returns
See Also

GetConversationReader(EmailQueryOptions) GetConversationReader(EmailQueryOptions) GetConversationReader(EmailQueryOptions) GetConversationReader(EmailQueryOptions)

Gets an instance of the EmailConversationReader class using the specified query options.

public : EmailConversationReader GetConversationReader(EmailQueryOptions options)public EmailConversationReader GetConversationReader(EmailQueryOptions options)Public Function GetConversationReader(options As EmailQueryOptions) As EmailConversationReader// You can use this method in JavaScript.
Parameters
options
EmailQueryOptions EmailQueryOptions EmailQueryOptions EmailQueryOptions

The query options to use when finding the conversation reader.

Returns
See Also

GetMessageAsync(String) GetMessageAsync(String) GetMessageAsync(String) GetMessageAsync(String)

Asynchronously gets the specified message from the folder.

public : IAsyncOperation<EmailMessage> GetMessageAsync(PlatForm::String id)public IAsyncOperation<EmailMessage> GetMessageAsync(String id)Public Function GetMessageAsync(id As String) As IAsyncOperation( Of EmailMessage )// You can use this method in JavaScript.
Parameters
id
PlatForm::String String String String

The ID of the message to retrieve.

Returns

GetMessageCountsAsync() GetMessageCountsAsync() GetMessageCountsAsync() GetMessageCountsAsync()

Asynchronously gets the counts of email items such as flagged emails, important emails, unread emails, total emails, and so on.

public : IAsyncOperation<EmailItemCounts> GetMessageCountsAsync()public IAsyncOperation<EmailItemCounts> GetMessageCountsAsync()Public Function GetMessageCountsAsync() As IAsyncOperation( Of EmailItemCounts )// You can use this method in JavaScript.
Returns

An EmailItemCounts object containing the counts of email items such as flagged emails, important emails, unread emails, total emails, and so on.

GetMessageReader() GetMessageReader() GetMessageReader() GetMessageReader()

Gets an instance of the EmailMessageReader class.

public : EmailMessageReader GetMessageReader()public EmailMessageReader GetMessageReader()Public Function GetMessageReader() As EmailMessageReader// You can use this method in JavaScript.
Returns
See Also

GetMessageReader(EmailQueryOptions) GetMessageReader(EmailQueryOptions) GetMessageReader(EmailQueryOptions) GetMessageReader(EmailQueryOptions)

Gets an instance of the EmailMessageReader class using the specified query options.

public : EmailMessageReader GetMessageReader(EmailQueryOptions options)public EmailMessageReader GetMessageReader(EmailQueryOptions options)Public Function GetMessageReader(options As EmailQueryOptions) As EmailMessageReader// You can use this method in JavaScript.
Parameters
options
EmailQueryOptions EmailQueryOptions EmailQueryOptions EmailQueryOptions

The query options to use when finding the message reader.

Returns

The message reader that matches the query options.

See Also

SaveMessageAsync(EmailMessage) SaveMessageAsync(EmailMessage) SaveMessageAsync(EmailMessage) SaveMessageAsync(EmailMessage)

Asynchronously saves the specified email message to the folder.

public : IAsyncAction SaveMessageAsync(EmailMessage message)public IAsyncAction SaveMessageAsync(EmailMessage message)Public Function SaveMessageAsync(message As EmailMessage) As IAsyncAction// You can use this method in JavaScript.
Parameters
message
EmailMessage EmailMessage EmailMessage EmailMessage

The email message to save.

Returns

An async action indicating that the operation has completed.

TryMoveAsync(EmailFolder) TryMoveAsync(EmailFolder) TryMoveAsync(EmailFolder) TryMoveAsync(EmailFolder)

Asynchronously attempts to move this folder to the specified folder.

public : IAsyncOperation<PlatForm::Boolean> TryMoveAsync(EmailFolder newParentFolder)public IAsyncOperation<bool> TryMoveAsync(EmailFolder newParentFolder)Public Function TryMoveAsync(newParentFolder As EmailFolder) As IAsyncOperation( Of bool )// You can use this method in JavaScript.
Parameters
newParentFolder
EmailFolder EmailFolder EmailFolder EmailFolder

The new location for this folder.

Returns

A Boolean value indicating if the move was successful.

See Also

TryMoveAsync(EmailFolder, String) TryMoveAsync(EmailFolder, String) TryMoveAsync(EmailFolder, String) TryMoveAsync(EmailFolder, String)

Asynchronously attempts to move this folder to the specified folder and rename it in the process.

public : IAsyncOperation<PlatForm::Boolean> TryMoveAsync(EmailFolder newParentFolder, PlatForm::String newFolderName)public IAsyncOperation<bool> TryMoveAsync(EmailFolder newParentFolder, String newFolderName)Public Function TryMoveAsync(newParentFolder As EmailFolder, newFolderName As String) As IAsyncOperation( Of bool )// You can use this method in JavaScript.
Parameters
newParentFolder
EmailFolder EmailFolder EmailFolder EmailFolder

The new location for this folder.

newFolderName
PlatForm::String String String String

The name for the folder in the new location.

Returns

A Boolean value indicating if the move was successful.

See Also

TrySaveAsync() TrySaveAsync() TrySaveAsync() TrySaveAsync()

Asynchronously attempts to save changes to the folder.

public : IAsyncOperation<PlatForm::Boolean> TrySaveAsync()public IAsyncOperation<bool> TrySaveAsync()Public Function TrySaveAsync() As IAsyncOperation( Of bool )// You can use this method in JavaScript.
Returns

A Boolean value indicating if the save was successful.