Outlook 邮件 API 概述Outlook mail API overview

Outlook 是 Office 365 的消息传递通信中心。Outlook is a messaging communication hub in Office 365. 它还允许你管理联系人、安排会议、在组织中查找有关用户的信息、启动在线对话、共享文件,以及实现小组协作。It also lets you manage contacts, schedule meetings, find information about users in an organization, initiate online conversations, share files, and collaborate in groups.

为什么与 Outlook 邮件集成?Why integrate with Outlook mail?

与丰富的功能集成进而服务于数以亿计的客户Integrate with rich features and reach hundreds of millions of customers

与 Outlook 集成意味着可利用客户所喜爱的丰富体验,即在包括移动、Web 和桌面在内的所有设备上提供的针对邮件、联系人日历的一致、直观体验。Integrating with Outlook means tapping into the rich experience that customers love - consistent, intuitive experience for mail, contacts, calendar, available on all devices - mobile, web, and desktop.

使用 Microsoft Graph,你只需编写一个应用与 Outlook 进行集成,即可服务于数以亿计的消费者,以及选择 Outlook 作为其电子邮件客户端的数以千万的组织客户。Using Microsoft Graph, you can integrate with Outlook by writing an app just once and reach more than hundreds of millions of consumers, and tens of millions of organization customers who choose Outlook as their email client. 你可以编写专注于邮件方案的应用,或连接到大量其他 Outlook 和非 Outlook 关系、资源和智能,并实现 Microsoft 云支持的方案。You can write apps that focus on mail scenarios, or connect to a wealth of other Outlook and non-Outlook relationships, resources, and intelligence, and realize scenarios supported by the Microsoft cloud.

自动化邮件组织和处理Automate message organization and processing

客户希望 Outlook 帮助他们保持井然有序。Customers like how Outlook help them stay organized. Microsoft Graph 为应用开发人员提供了这些功能,让他们能够构建可优化发现及提高效率和生产率的客户工作流:Microsoft Graph brings these features to app developers, enabling them to build customer workflows that optimize on discovery and improve efficiency and productivity:

  • 客户会以不同的方式组织他们的邮件,一些客户会将所有邮件都放在收件箱中,只需搜索即可,而有些客户会在文件夹中归档邮件。Customers organize their messages in different ways - some leave all messages in the Inbox and simply search for them, others file their messsages in folders. 他们喜欢 Outlook 这种可支持扁平式组织和基于文件夹组织的灵活又直观的方法。They like Outlook's flexible and intuitive approach that supports both flat and folder-based organizations. 应用可以方便地对特定文件夹或用户整个邮箱中的邮件进行筛选、搜索或排序Apps can conveniently filter, search, or sort messages in specific folders or the user's entire mailbox.

  • Outlook 类别按名称和颜色进行区分。Outlook categories are differentiated by name and color. 客户可使用类别标记邮件,以增强组织和发现。Categories allow customers to tag messages to enhance organization and discovery. 应用可以访问和定义用户的主类别列表Apps can access and define a user's master list of categories. 此外,该列表可在 Outlook 邮件,以及事件、联系人、任务和组文章中进行共享,为应用开发者开启了创造性的应用场景。More, that list is shared across Outlook messages, as well as events, contacts, tasks, and group posts, and opens up creative scenarios for app developers. 例如,在线培训提供商可以为电子邮件、课程事件设置颜色代码,并跟进用户已注册的各课程的后续作业。For example, an online training provider can color-code the emails, course events, and follow-up assignments for each course a user has enrolled in.

  • 此外,应用用户还可更改邮件(或事件或任务)的重要性,或标记邮件以供后续跟进。Additionally, app users can change the importance of a message (or event or task), or flag a message for follow-up. (Microsoft Graph 中的标记目前为预览状态。)(Flagging is currently in preview in Microsoft Graph.)

  • 规则 API 将邮件组织提升到了一个新的水平。The rules API takes message organization to the next level. 应用可以设置收件箱规则,以尽快处理传入的邮件并减少电子邮件混乱。Apps can set up Inbox rules to promptly handle incoming messages and reduce email clutter. 例如,如果邮件主题行包含某些关键字,则应用可以自动将邮件移动到另一个文件夹,并分配类别和重要性,使其易于后续跟进。For example, an app can automatically move messages to another folder if their subject lines contain certain keywords, and assign categories and importance to make them easier for later follow-up.

编写利用智能的更智能应用Write smarter apps that leverage intelligence

使用 Microsoft Graph 向应用用户建议上下文数据:Use Microsoft Graph to suggest contextual data to your app users:

  • 重点收件箱@提及(预览版)集成,让应用用户能够先阅读和答复与自己相关的邮件。Integrate with Focused Inbox and @-mentions (preview) and let your app users read and respond to what's relevant to them first.

  • 一边查看邮件提示,一边仍能撰写邮件,以获取收件人的实用状态信息(如收件人正在发送自动答复或邮箱已满)。Check mail tips while still composing a message to get useful status information about a recipient (such as the recipient sending an auto-reply or has a full mailbox). 邮件提示可以提醒应用注意特定条件,以便采取更高效的跟进操作。Mail tips can alert apps of certain conditions so to take more efficient follow-up actions instead.

  • 使用人员 API 提供交互式控件,如应用中的人员选取器。Make use of the people API to provide interactive controls such as a people picker in your app. 人员 API 可根据用户通信和协作模式及业务关系建议与用户相关度最高的人员。The people API can suggest persons most relevant to a user, based on the user’s communication and collaboration patterns and business relationships.

  • 为应用用户提供智能文件选取器并建议他们最近与之交互的文件,以便在撰写邮件时以附件形式添加。Offer app users a smart file picker and suggest files that they have recently interacted with, to add as attachments when composing a message. 见解(预览版)使用高级分析来推荐用户有可能使用的文件、用户最近查看或编辑过的文件或与用户共享的文件。Insights (preview) use advanced analytics to suggest files that are trending around a user, recently viewed or edited by the user, or shared with the user.

在资源或资源实例中存储应用数据Store app data in a resource or resource instance

大部分情况下,应用需要将数据存储在外部数据存储中,并承担数据管理和访问开销。Often times apps have to store their data in an external data store and entail overhead in managing and accessing the data. 借助 Microsoft Graph,可以在创建发送新邮件或邮件回复时,直接将应用数据添加为 Internet 邮件头。Microsoft Graph lets you simply include app data as Internet message headers when creating or sending a new message, or a reply to a message.

如果需要添加并随后更新自定义数据,可以在各个资源实例中存储数据If you need to add and subsequently update custom data, you can store the data in individual resource instances. 也可以在适当情况下扩展架构、添加自定义属性,并在 Microsoft Graph 资源中存储类型化数据。If appropriate, as an alternative, you can extend the schema, add custom properties, and store typed data in Microsoft Graph resources. 可以让此类架构扩展可供发现和共享。You can make such schema extensions discoverable and shareable.

API 参考API reference

在查找此服务的 API 参考?Looking for the API reference for this service?

后续步骤Next steps