IMAPISupport::ReadReceipt

Applies to: Office 2010 | Outlook 2010 | Visual Studio

Generates a read or nonread report for a message.

HRESULT ReadReceipt(
ULONG ulFlags,
LPMESSAGE lpReadMessage,
LPMESSAGE FAR * lppEmptyMessage
);

Parameters

  • ulFlags
    [in] A bitmask of flags that controls how the read or nonread report is generated. The following flag can be set:

    • MAPI_NON_READ
      A nonread report is generated. If MAPI_NON_READ is not set, a read report is generated.
  • lpReadMessage
    [in] A pointer to the message about which the report should be generated.

  • lppEmptyMessage
    [in, out] On input, lppEmptyMessage points to a pointer to an empty message. On output, lppEmptyMessage points to a pointer to the report message.

Return Value

  • S_OK
    The report was successfully generated.

Remarks

The IMAPISupport::ReadReceipt method is implemented only for message store provider support objects. Message store providers call ReadReceipt to instruct MAPI to generate a read or nonread report for the message pointed to by the lpReadMessage parameter.

Notes to Callers

Call ReadReceipt when the PR_READ_RECEIPT_REQUESTED (PidTagReadReceiptRequested) property is set and one of the following conditions is true:

  • The message has been read.

  • The message has been moved.

  • The message has been copied.

  • The message's IMessage::SetReadFlag method has been called.

Do not call ReadReceipt when a message is deleted.

A read or nonread report should be sent only once for a message. Keep track of a message's read status and do not send multiple reports for a single message.

If the lppEmptyMessage parameter points to a valid report message when MAPI returns from ReadReceipt, call the IMessage::SubmitMessage method to send the message and then release the pointer by calling its IUnknown:s:Release method.

If ReadReceipt fails, the message should be released without being submitted. If you store the message's read status, you can attempt to generate the read or nonread report at a later time.

You can either hide or display read and nonread reports generated by stores in your folders. Storing read and nonread reports in hidden folders enables you to implement tighter security.

See Also

Reference

IMAPIFolder::DeleteMessages

IMessage::SubmitMessage

PidTagReadReceiptRequested Canonical Property

IMAPISupport : IUnknown