【问题标题】:EWS API: how to retrieve modification date for an attachmentEWS API:如何检索附件的修改日期
【发布时间】:2019-06-25 21:22:30
【问题描述】:

我想从 EWS API 检索附件。不幸的是,GetAttachment 默认不返回附件的修改日期。

我的 EWS API SOAP 请求:

<?xml version="1.0" encoding="UTF-8"?>
        <soap:Envelope
            xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
            xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages"
            xmlns:t="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">
            <soap:Header>
                <t:RequestServerVersion Version="Exchange2013_SP1" />
                <t:ExchangeImpersonation>
                    <t:ConnectingSID>
                        <t:PrimarySmtpAddress>%1%</t:PrimarySmtpAddress>
                    </t:ConnectingSID>
                </t:ExchangeImpersonation>
            </soap:Header>
            <soap:Body>
                <m:GetAttachment>
                    <m:AttachmentShape />
                    <m:AttachmentIds>
                        <t:AttachmentId Id="%2%" />
                    </m:AttachmentIds>
                </m:GetAttachment>
            </soap:Body>
        </soap:Envelope>

是否可以从 EWS API 获取修改日期?我该怎么做?谢谢。

【问题讨论】:

    标签: exchangewebservices


    【解决方案1】:

    是的,这是可能的。您有正确的GetAttachment 操作,但首先您需要获取邮件和附件集合才能获取要检索的附件的AttachmentId

    使用GetItem 操作来执行此操作。然后,GetItemResponse 消息将包含您要查找的 LastModifiedTime 属性。

    Get an attachment from an email by using EWS

    【讨论】:

    • 您能否提供一个示例,我应该如何在上面的请求中正确设置此属性?谢谢
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-11-09
    • 1970-01-01
    • 1970-01-01
    • 2023-04-09
    • 2015-01-16
    • 1970-01-01
    相关资源
    最近更新 更多