Remove recipients from Outlook email if automatic reply is activated

前端 未结 1 2024
栀梦
栀梦 2021-01-25 22:35

I have a VBA script that generate and send an email. Sometimes some of the recipients of the email are out of office and have an Automatic Reply turned on. Since the content of

1条回答
  •  有刺的猬
    2021-01-25 23:04

    You can either

    1. use Exchange Web Services API to retrieve the OOF status

    2. use Extended MAPI (C++ or Delphi only) to open the other user's mailbox (IMsgStore) and read the PR_OOF_STATE property.

    3. Use Redemption (any language; disclaimer: I am Redemption developer) and use RDOExchangeMailboxStore.OutOfOfficeAssistant or read the PR_OOF_STATE property using RDOStore.Fields[]. To open other user's mailbox, you can use RDOSession.GetSharedMailbox.

    4. UPDATE. Note that #2 and #3 require access rights to the mailbox in question. You can do what Outlook does when it displays the mail tip in a banner when a recipient you are about to send to is OOF. Use EWS and GetMailTips operation. Redemption exposes this functionality through RDOAddressEntry.GetMailtips and RDOMailTips object.

    0 讨论(0)
提交回复
热议问题