Outlook Web Access加载项问题

时间:2016-07-01 11:18:27

标签: outlook-addin

我开始为OWA for Exchange 2013开发插件。 我有几个与之相关的问题。 如果有人能帮助我,我会很高兴。

  1. 是否可以在OWA的顶部窗格中添加按钮(通过清单中的加载项命令)? http://screencast.com/t/CvOqOsnI
  2. 是否可以获取邮件内容?让我们说字节数组或base64字符串...我已经浏览了文档并且没有发现它。 Office.context.mailbox.item没有方法或属性来获取邮件的内容。
  3. 提前谢谢。

2 个答案:

答案 0 :(得分:0)

  1. 据我了解,您希望将您的扩展程序与“移至”和“类别”放在一起。如果那就是你想要的,我想说这是不可能的。
  2. 这里我有解决方法,您可以将SOAP请求发送到Exchange API并获取邮件内容。

答案 1 :(得分:0)

  1. 加载项命令在Outlook 2013和2016中仅当前 supported。它们很可能在将来的Outlook Online和Outlook.com中可用。
  2. 如果Outlook.context.mailbox.item.Body.getAsync不够,并且您需要邮件的完整MIME内容,请将mailbox.makeEWSRequestAsync与包含7C08扩展属性的GetItem调用一起使用:
  3. 
    
    <!--Call:-->
    <?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
      <soap:Header>
        <RequestServerVersion Version="Exchange2013" xmlns="http://schemas.microsoft.com/exchange/services/2006/types" />
      </soap:Header>
      <soap:Body>
        <GetItem xmlns="http://schemas.microsoft.com/exchange/services/2006/messages">
          <ItemShape>
            <t:BaseShape>Default</t:BaseShape>
            <t:AdditionalProperties>
              <t:FieldURI FieldURI="item:Body" />
              <t:FieldURI FieldURI="item:Subject" />
              <t:ExtendedFieldURI PropertyTag="7C08" PropertyType="Binary" />
            </t:AdditionalProperties>        
          </ItemShape>
          <ItemIds>
            <t:ItemId Id="AAMkAGUzNmEzYTBmLTI1NDItNGE0My1iZDk5LWFkMDgxODI3YWNlOQBGAAAAAACK2VEhi72QSaw+u0XV7xUHBwCMotTyA3QkQ7TPAmcrRt4FAAAALwVMAAAuH/1UA8tzTYD5jbYriaIUAAAJ5576AAA=" />
          </ItemIds>
        </GetItem>
      </soap:Body>
    </soap:Envelope>
    
    <!--Response:-->
    <?xml version="1.0" encoding="utf-8"?>
    <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
      <s:Header>
        <h:ServerVersionInfo MajorVersion="15" MinorVersion="1" MajorBuildNumber="396" MinorBuildNumber="20" Version="V2015_10_05" xmlns:h="http://schemas.microsoft.com/exchange/services/2006/types" xmlns="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
      </s:Header>
      <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
        <m:GetItemResponse xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
          <m:ResponseMessages>
            <m:GetItemResponseMessage ResponseClass="Success">
              <m:ResponseCode>NoError</m:ResponseCode>
              <m:Items>
                <t:Message>
                  <t:MimeContent CharacterSet="UTF-8">U3ViamVjdDoNClRocmVhZC1JbmRleDogQVFIT3hWSjZLdTJONnltWUxVNlBtQWNpamJYaTdBPT0NCkRhdGU6IFRodSwgMTAgT2N0IDIwMTMgMDA6NDg6NDggKzAwMDANCk1lc3NhZ2UtSUQ6DQoJPGI3MDM3MWNkYjkyZTRhYjc4NzFlM2FjYjgzZjVmMmJlQEJOMVBSMDRNQjM1OC5uYW1wcmQwNC5wcm9kLm91dGxvb2suY29tPg0KQ29udGVudC1MYW5ndWFnZTogZW4tQ0ENClgtTVMtSGFzLUF0dGFjaDoNClgtTVMtVE5FRi1Db3JyZWxhdG9yOg0KQ29udGVudC1UeXBlOiB0ZXh0L3BsYWluOyBjaGFyc2V0PSJ1cy1hc2NpaSINCk1JTUUtVmVyc2lvbjogMS4wDQoNCg==</t:MimeContent>
                  <t:ItemId Id="AAMkAGUzNmEzYTBmLTI1NDItNGE0My1iZDk5LWFkMDgxODI3YWNlOQBGAAAAAACK2VEhi72QSaw+u0XV7xUHBwCMotTyA3QkQ7TPAmcrRt4FAAAALwVMAAAuH/1UA8tzTYD5jbYriaIUAAAJ5576AAA=" ChangeKey="CQAAABYAAAAuH/1UA8tzTYD5jbYriaIUAAAJ6HVa"/>
                  <t:Sensitivity>Normal</t:Sensitivity>
                  <t:Body BodyType="Text" IsTruncated="false"/>
                  <t:Size>1618</t:Size>
                  <t:DateTimeSent>2013-10-10T00:48:48Z</t:DateTimeSent>
                  <t:DateTimeCreated>2013-10-10T00:48:47Z</t:DateTimeCreated>
                  <t:ResponseObjects>
                    <t:ForwardItem/>
                  </t:ResponseObjects>
                  <t:HasAttachments>false</t:HasAttachments>
                  <t:IsAssociated>true</t:IsAssociated>
                  <t:IsReadReceiptRequested>false</t:IsReadReceiptRequested>
                  <t:IsRead>true</t:IsRead>
                </t:Message>
              </m:Items>
            </m:GetItemResponseMessage>
          </m:ResponseMessages>
        </m:GetItemResponse>
      </s:Body>
    </s:Envelope>
    &#13;
    &#13;
    &#13;