IMAPISupport::StatusRecips

The IMAPISupport::StatusRecips method generates delivery and nondelivery reports.

Quick Info

See IMAPISupport : IUnknownA6YDUA.

HRESULT StatusRecips(

    LPMESSAGE lpMessage,

 

    LPADRLIST lpRecipList

 

   )

 

 

Parameters

lpMessage

[in] Pointer to the message for which the report should be generated.

lpRecipList

[in] Pointer to an ADRLIST16760YG structure describing the recipients of the message pointed to by lpMessage.

 

Return Values

S_OK

The report was successfully generated.

MAPI_W_ERRORS_RETURNED

The call succeeded overall, but there are no recipient options for this type of recipient. When this warning is returned, the call should be handled as successful. To test for this warning, use the HR_FAILED macro. See Using Macros for Error Handling3AFTHZP.

 

Remarks

The IMAPISupport::StatusRecips method is implemented for transport provider support objects. Transport providers call StatusRecips to request that MAPI send a delivery or nondelivery report to a set of one or more of the recipients of a message.

Notes to Callers

You can call StatusRecips multiple times during the processing of a message. However, if you call StatusRecips for an open message, do your best to collect all delivery and nondelivery information for the message recipients and call StatusRecips for that recipient list. A single point of collection is important because multiple StatusRecips calls for one recipient can result in multiple identical reports being sent.

Store properties relating to message delivery or nondelivery in the ADRLIST16760YG structure indicated by the lpRecipList parameter. For a complete list of required and optional properties for delivery reports and nondelivery reports, see Required Report Message Properties5AME_LP and Optional Report Message Properties69GQ_64.

Allocate memory for the ADRLIST structure in lpRecipList using the MAPIAllocateBuffer1MW3BAZ and MAPIAllocateMoreB1SGX_ functions. MAPI releases the memory by calling the MAPIFreeBuffer16U06F function only if IMAPISupport::StatusRecips succeeds.

For an overview of delivery and nondelivery reports, see Report MessagesNEULS1.

See Also

ADRLIST, IMAPISupport::Address, IMAPISupport::SpoolerNotify, IXPLogon::EndMessage, MAPIAllocateBuffer, MAPIAllocateMore, MAPIFreeBuffer