Outlook外接程序-&>上下文外接程序清单

Outlook add-in -gt; Context add-in Manifest(Outlook外接程序-上下文外接程序清单)

本文介绍了Outlook外接程序-&>上下文外接程序清单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试创建可在每封电子邮件中激活的Outlook外接程序。我想知道有没有办法调用这样的函数执行。 我只需要有权尽快访问电子邮件文本的用户去查看电子邮件。 用于使用人工智能进行欺诈检测。

我找到了Microsoft的此清单:

 <?xml version="1.0" encoding="UTF-8"?>
<OfficeApp
          xmlns="http://schemas.microsoft.com/office/appforoffice/1.1"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0"
          xmlns:mailappor="http://schemas.microsoft.com/office/mailappversionoverrides/1.0"
          xsi:type="MailApp">

  <!-- Begin Basic Settings: Add-in metadata, used for all versions of Office unless override provided. -->

  <!-- IMPORTANT! Id must be unique for your add-in, if you reuse this manifest ensure that you change this id to a new GUID. -->
  <Id>351bf5d8-c3e5-4c35-8f0b-3da9a28f22f2</Id>

  <!-- Version. Updates from the store only get triggered if there is a version change. -->
  <Version>1.0.0.0</Version>
  <ProviderName>Outlook Dev Center</ProviderName>
  <DefaultLocale>en-US</DefaultLocale>
  <!-- The display name of your add-in. Used on the store and various places of the Office UI such as the add-ins dialog. -->
  <DisplayName DefaultValue="Contoso Order Number Add-in" />
  <Description DefaultValue="A sample add-in that demonstrates contextual activation on a Regex match."/>

  <!-- Icon for your add-in. Used on installation screens and the add-ins dialog. -->
  <IconUrl DefaultValue="https://127.0.0.1:8080/assets/icon-32.png" />
  <HighResolutionIconUrl DefaultValue="https://127.0.0.1:8080/assets/hi-res-icon.png"/>
  <!-- End Basic Settings. -->

  <!-- Legacy settings -->
  <!-- These values will be used for legacy clients that do not understand the -->
  <!-- VersionOverrides schema. These values will be ignored by clients that do -->
  <!-- understand VersionOverrides, with the exception of Permissions -->
  <Hosts>
    <Host Name="Mailbox" />
  </Hosts>
  <Requirements>
    <Sets>
      <Set Name="Mailbox" MinVersion="1.1" />
    </Sets>
  </Requirements>
  <FormSettings>
    <Form xsi:type="ItemRead">
      <DesktopSettings>
        <SourceLocation DefaultValue="https://127.0.0.1:8080/index.html"/>
        <RequestedHeight>250</RequestedHeight>
      </DesktopSettings>
    </Form>
  </FormSettings>

  <Permissions>ReadWriteItem</Permissions>
  <!-- Note that this Rule element matches the Rule element inside the -->
  <!-- DetectedEntity element below. This is so that older clients will be able -->
  <!-- to activate the add-in on the same context. -->
  <Rule xsi:type="RuleCollection" Mode="And">
    <Rule xsi:type="ItemIs" ItemType="Message" FormType="Read" />
    <Rule xsi:type="ItemHasRegularExpressionMatch" RegExName="9Digits" RegExValue="d{9}" PropertyName="BodyAsPlaintext"/>
  </Rule>
  <DisableEntityHighlighting>false</DisableEntityHighlighting>

  <VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides" xsi:type="VersionOverridesV1_0">
    <!-- VersionOverrides for the v1.1 schema -->
    <VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides/1.1" xsi:type="VersionOverridesV1_1">
      <Requirements>
        <bt:Sets DefaultMinVersion="1.5">
          <bt:Set Name="Mailbox" />
        </bt:Sets>
      </Requirements>
      <Hosts>
        <Host xsi:type="MailHost">

          <DesktopFormFactor>
            <!-- DetectedEntity -->
            <ExtensionPoint xsi:type="DetectedEntity">
              <Label resid="contextLabel" />
              <SourceLocation resid="detectedEntityURL" />
              <Rule xsi:type="RuleCollection" Mode="And">
                <Rule xsi:type="ItemIs" ItemType="Message" />
                <Rule xsi:type="ItemHasRegularExpressionMatch" RegExName="OrderNumber" RegExValue="CO-d{9}" PropertyName="BodyAsPlaintext"/>
              </Rule>
            </ExtensionPoint>
          </DesktopFormFactor>
        </Host>
      </Hosts>

      <Resources>
        <bt:Images>
          <bt:Image id="icon16" DefaultValue="https://127.0.0.1:8080/assets/icon-16.png"/>
          <bt:Image id="icon32" DefaultValue="https://127.0.0.1:8080/assets/icon-32.png"/>
          <bt:Image id="icon80" DefaultValue="https://127.0.0.1:8080/assets/icon-80.png"/>
        </bt:Images>
        <bt:Urls>
          <bt:Url id="detectedEntityURL" DefaultValue="https://127.0.0.1:8080/index.html"/>
        </bt:Urls>
        <bt:ShortStrings>
          <bt:String id="contextLabel" DefaultValue="Order Number Detected"/>
        </bt:ShortStrings>
      </Resources>
    </VersionOverrides>
  </VersionOverrides>
</OfficeApp>

该问题仅使用正则表达式激活。

推荐答案

有一种方法可用于Compose add-ins to run automatically基于Requirements Set 1.10中的某些事件,但Read Add-Inc.没有类似的功能。

上下文加载项仍需要与用户交互才能启动加载项。

用户可以固定任务窗格加载项,它将自动启动,但这需要用户执行操作,并且该加载项始终可见。

对于您描述的场景的一部分,您希望获得电子邮件的文本。这可以通过使用change notifications in Microsoft Graph的后端服务来实现,该服务可以在用户收到电子邮件时通知该服务。但是,这将在每条消息上触发,而不仅仅是用户阅读的消息。

这篇关于Outlook外接程序-&>上下文外接程序清单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本文标题为:Outlook外接程序-&>上下文外接程序清单

基础教程推荐