mailFolder 资源类型mailFolder resource type

用户邮箱中的邮箱文件夹,例如收件箱和草稿箱。A mail folder in a user's mailbox, such as Inbox and Drafts. 邮箱文件夹可以包含邮件、其他 Outlook 项和子邮件文件夹。Mail folders can contain messages, other Outlook items, and child mail folders.

该资源支持通过提供 delta 函数使用增量查询跟踪增量添加、删除和更新。This resource supports using delta query to track incremental additions, deletions, and updates, by providing a delta function.

已知文件夹名称Well-known folder names

Outlook 默认情况下会为用户创建某些文件夹。Outlook creates certain folders for users by default. 访问这些文件夹时,而不是使用的相应文件夹id值,为方便起见,您可以使用下表中的已知文件夹名称。Instead of using the corresponding folder id value, for convenience, you can use the well-known folder names from the table below when accessing these folders. 例如,您可以获取其已知名称使用以下查询草稿文件夹。For example, you can get the Drafts folder using its well-known name with the following query.

GET /me/mailFolders/drafts

已知名称工作无论用户的邮箱的区域设置上述查询将始终返回命名方式无论用户的草稿文件夹。Well-known names work regardless of the locale of the user's mailbox, so the above query will always return the user's Drafts folder regardless of how it is named.

已知文件夹名称Well-known folder name 说明Description
存档archive 存档文件夹邮件发送到在支持的 Outlook 客户端使用 One_Click 存档功能时。The archive folder messages are sent to when using the One_Click Archive feature in Outlook clients that support it. 注意: 这是不相同的存档邮箱功能的 Exchange online。Note: this is not the same as the Archive Mailbox feature of Exchange online.
混乱clutter 混乱文件夹低优先级邮件移动到时使用的混乱功能。The clutter folder low-priority messages are moved to when using the Clutter feature.
冲突conflicts 包含邮箱中的冲突项目的文件夹。The folder that contains conflicting items in the mailbox.
conversationhistoryconversationhistory 其中 Skype 保存 IM 对话 (如果 Skype 配置这样) 中的文件夹。The folder where Skype saves IM conversations (if Skype is configured to do so).
DeletedItemsdeleteditems 文件夹项目移到时被删除。The folder items are moved to when they are deleted.
草稿drafts 包含未发送的邮件的文件夹。The folder that contains unsent messages.
收件箱inbox 收件箱文件夹中。The inbox folder.
junkemailjunkemail 垃圾邮件文件夹中。The junk email folder.
localfailureslocalfailures 包含本地客户端上存在,但无法上载到服务器的项目的文件夹。The folder that contains items that exist on the local client but could not be uploaded to the server.
msgfolderrootmsgfolderroot "顶部的信息存储"文件夹中。The "Top of Information Store" folder. 此文件夹的父文件夹的普通邮件客户端,如收件箱中显示的文件夹。This folder is the parent folder for folders that are displayed in normal mail clients, such as the inbox.
发件箱outbox 发件箱文件夹中。The outbox folder.
recoverableitemsdeletionsrecoverableitemsdeletions 包含软删除项目的文件夹: 删除从已删除邮件文件夹中,或通过按 shift + delete 在 Outlook 中。The folder that contains soft-deleted items: deleted either from the Deleted Items folder, or by pressing shift+delete in Outlook. 此文件夹不可见在任何 Outlook 电子邮件客户端,但是与其进行交互的最终用户可以通过中 Outlook 或 Outlook web 上的从服务器恢复已删除邮件功能。This folder is not visible in any Outlook email client, but end users can interact with it through the Recover Deleted Items from Server feature in Outlook or Outlook on the web.
已计划scheduled 包含计划重新显示在适用于 iOS 的 Outlook 中使用的日程安排功能收件箱中的邮件文件夹。The folder that contains messages that are scheduled to reappear in the inbox using the Schedule feature in Outlook for iOS.
searchfolderssearchfolders 在用户的邮箱中定义的所有搜索文件夹的父文件夹。The parent folder for all search folders defined in the user's mailbox.
sentitemssentitems 已发送的邮件文件夹中。The sent items folder.
serverfailuresserverfailures 包含服务器上存在,但无法同步到本地客户端的项目的文件夹。The folder that contains items that exist on the server but could not be synchronized to the local client.
syncissuessyncissues 包含由 Outlook 创建的同步日志的文件夹。The folder that contains synchronization logs created by Outlook.


方法Method 返回类型Return Type 说明Description
获取 mailFolderGet mailFolder mailFoldermailFolder 读取 mailFolder 对象的属性和关系。Read properties and relationships of mailFolder object.
创建 MailFolderCreate MailFolder MailFolderMailFolder 通过发布到 childFolder 集合,在当前 mailFolder 下新建 mailFolder。Create a new mailFolder under the current one by posting to the childFolders collection.
列出 childFolderList childFolders MailFolder 集合MailFolder collection 获取指定文件夹下的文件夹集合。你可以使用 .../me/MailFolders 快捷方式获取顶级文件夹集合并导航到其他文件夹。Get the folder collection under the specified folder. You can use the .../me/MailFolders shortcut to get the top-level folder collection and navigate to another folder.
创建邮件Create Message 邮件Message 通过发布到邮件集合,在当前 mailFolder 中新建邮件。Create a new message in the current mailFolder by posting to the messages collection.
列出邮件List messages 邮件 集合Message collection 获取已登录用户邮箱中的所有邮件或邮箱的指定文件夹中的邮件。Get all the messages in the signed-in user's mailbox, or those messages in a specified folder in the mailbox.
更新Update mailFoldermailFolder 更新指定的 mailFolder 对象。Update the specified mailFolder object.
删除Delete None 删除指定的 mailFolder 对象。Delete the specified mailFolder object.
复制copy MailFolderMailFolder 将 mailfolder 及其内容复制到其他 mailfolder。Copy a mailFolder and its contents to another mailFolder.
deltadelta mailFolder 集合mailFolder collection 获取用户邮箱中已添加、删除或移除的邮件文件夹集。Get a set of mail folders that have been added, deleted, or removed from the user's mailbox.
移动move MailFolderMailFolder 将 mailFolder 及其内容移动到其他 mailFolder。Move a mailFolder and its contents to another mailFolder.
扩展属性Extended properties
创建单值扩展属性Create single-value extended property mailFoldermailFolder 在新建或现有的 mailFolder 中创建一个或多个单值扩展属性。Create one or more single-value extended properties in a new or existing mailFolder.
获取具有单值扩展属性的 mailFolderGet mailFolder with single-value extended property mailFoldermailFolder 通过使用 $expand$filter 获取包含一个单值扩展属性的 mailFolder。Get mailFolders that contain a single-value extended property by using $expand or $filter.
创建多值扩展属性Create multi-value extended property mailFoldermailFolder 在新建或现有的 mailFolder 中创建一个或多个多值扩展属性。Create one or more multi-value extended properties in a new or existing mailFolder.
获取具有多值扩展属性的 mailFolderGet mailFolder with multi-value extended property mailFoldermailFolder 使用 $expand 获取包含一个多值扩展属性的 mailFolder。Get a mailFolder that contains a multi-value extended property by using $expand.


属性Property 类型Type 说明Description
childFolderCountchildFolderCount Int32Int32 当前 mailFolder 中的直接子 mailFolder 数量。The number of immediate child mailFolders in the current mailFolder.
displayNamedisplayName StringString mailFolder 的显示名称。The mailFolder's display name.
idid 字符串String MailFolder 的唯一标识符。The mailFolder's unique identifier.
parentFolderIdparentFolderId StringString MailFolder 的父 mailFolder 的唯一标识符。The unique identifier for the mailFolder's parent mailFolder.
totalItemCounttotalItemCount Int32Int32 邮箱中项的数量The number of items in the mailFolder.
unreadItemCountunreadItemCount Int32Int32 mailFolder 中标记为未读的项的数量。The number of items in the mailFolder marked as unread.

有效的访问项计数Access item counts efficiently

TotalItemCountUnreadItemCount文件夹的属性,可以方便地计算的文件夹中的读取项目数。The TotalItemCount and UnreadItemCount properties of a folder allow you to conveniently compute the number of read items in the folder. 它们使您可以避免查询会引发大量延迟如下:They let you avoid queries like the following that can incur significant latency:$count=true&$filter=isread%20eq%20false

在 Outlook 中的邮件文件夹可以包含多个类型的项目,例如,可以包含收件箱会议请求项目的不同邮件项目。Mail folders in Outlook can contain more than one type of items, for example, the Inbox can contain meeting request items which are distinct from mail items. TotalItemCountUnreadItemCount包括而不考虑其项目类型的邮件文件夹中的项目。TotalItemCount and UnreadItemCount include items in a mail folder irrespective of their item types.


关系Relationship 类型Type 说明Description
childFolderschildFolders MailFolder 集合MailFolder collection mailFolder 中的子文件夹集合。The collection of child folders in the mailFolder.
messageRulesmessageRules messageRule 集合messageRule collection 适用于用户“收件箱”文件夹的规则集合。The collection of rules that apply to the user's Inbox folder.
messagesmessages 邮件 集合Message collection mailFolder 中的邮件集合。The collection of messages in the mailFolder.
multiValueExtendedPropertiesmultiValueExtendedProperties multiValueLegacyExtendedProperty 集合multiValueLegacyExtendedProperty collection 为 mailFolder 定义的多值扩展属性的集合。只读。可为 NULL。The collection of multi-value extended properties defined for the mailFolder. Read-only. Nullable.
singleValueExtendedPropertiessingleValueExtendedProperties singleValueLegacyExtendedProperty collectionsingleValueLegacyExtendedProperty collection 为 mailFolder 定义的单值扩展属性的集合。只读。可为 NULL。The collection of single-value extended properties defined for the mailFolder. Read-only. Nullable.

JSON 表示形式JSON representation

下面是资源的 JSON 表示形式。Here is a JSON representation of the resource

  "childFolderCount": 1024,
  "displayName": "string",
  "id": "string (identifier)",
  "parentFolderId": "string",
  "totalItemCount": 1024,
  "unreadItemCount": 1024,
  "childFolders": [ { "@odata.type": "microsoft.graph.mailFolder" } ],
  "messageRules": [ { "@odata.type": "microsoft.graph.messageRule" } ],
  "messages": [ { "@odata.type": "microsoft.graph.message" } ],
  "multiValueExtendedProperties": [ { "@odata.type": "microsoft.graph.multiValueLegacyExtendedProperty" }],
  "singleValueExtendedProperties": [ { "@odata.type": "microsoft.graph.singleValueLegacyExtendedProperty" }]

另请参阅See also