INFO: EDK Sends Read Receipt for Reading a Read Receipt (238079)



The information in this article applies to:

  • Microsoft Exchange Development Kit (EDK) 5.0
  • Microsoft Exchange Development Kit (EDK) 5.5

This article was previously published under Q238079

SUMMARY

The EDK sample gateway causes the creation of a read receipt while opening a read receipt message.

MORE INFORMATION

SDK samples located in the SDKDIR\samples\dbmsg\exchange\gwsample directory contain sample code for a gateway that is provided with the platform. With this sample code a gateway for the Microsoft Exchange Server can be built and configured for mail transfers.

In GWSample.c the return receipt is requested explicitly as in the function definition DWORD ProcessMtsIn(LPVOID lpParameter), see the following code fragments.

For a non-read receipt:
   else if((_tcsstr(lpszMessageClass, TEXT("REPORT.IPM")) != NULL) 
               && _tcsstr(lpszMessageClass, TEXT(".IPNNRN")) != NULL))
   {

            hr = HrMAPISetPropBoolean(
                (LPMAPIPROP)lpEnvelope,
                PR_NON_RECEIPT_NOTIFICATION_REQUESTED,
                TRUE);  

            if(FAILED(hr))
            {
                hr = HR_LOG(E_FAIL);
                goto cleanup;
            }
				
For a read receipt:
   else if((_tcsstr(lpszMessageClass, TEXT("REPORT.IPM")) != NULL) &&
                (_tcsstr(lpszMessageClass, TEXT(".IPNRN")) != NULL))
        {

            hr = HrMAPISetPropBoolean(
                (LPMAPIPROP)lpEnvelope,
                PR_READ_RECEIPT_REQUESTED,
                TRUE);  

            if(FAILED(hr))
            {
                hr = HR_LOG(E_FAIL);
                goto cleanup;
            }
				
Again, Ipm_in.dll in Convcls.cpp in the definition of function HRESULT CIPMConvert::HrSetEnvelopeProps() receipt is asked explicitly for a read receipt as well as a non-read receipt as shown in the following code fragment.
   if ( m_MsgType == mtNRN )   // have a non-read notification
        {
            rgEnvProps[iNotifyReqVal].ulPropTag = 
                PR_NON_RECEIPT_NOTIFICATION_REQUESTED;
        }
    
        else    // have a read notification
        {
            rgEnvProps[iNotifyReqVal].ulPropTag =
               PR_READ_RECEIPT_REQUESTED;
        }

        rgEnvProps[iNotifyReqVal].Value.b = TRUE; 
				

Work Around

You need to modify the code to remove the explicit request of receipts for (non)read receipt and build a new Ipm_in.dll and GWSample.exe.

Modification Type:MinorLast Reviewed:3/4/2004
Keywords:kbinfo kbMsg kbnofix KB238079