PRB: MAPI_W_PARTIAL_SUCCESS When Creating a Forward RuleLast reviewed: February 3, 1998Article ID: Q180200 |
The information in this article applies to:
SYMPTOMSCreating rules to forward mail to other users is common. Forwarding rules created using HrStringToAction(), HrStringToRestriction(), and HrInsert() returns a MAPI_W_PARTIAL_SUCCESS on the HrInsert() even though the other two calls HrStringToAction() and HrStringToRestriction() complete successfully.
CAUSEThe restriction for a forwarding rule requires the FL_LOOSE flag. The address list that is part of the action structure is missing the PR_RECIPIENT_TYPE property.
RESOLUTIONAdd the following code after the call to create the restriction:
lpRes->res.resContent.ulFuzzyLevel = FL_SUBSTRING | FL_IGNORECASE | FL_LOOSE;Add the following code after the call to create the action:
if (lpActs->lpAction->acttype == OP_FORWARD) { lpActs->lpAction[0].lpadrlist->aEntries->ulReserved1 = 1L; lpActs->lpAction[0].lpadrlist->aEntries->cValues += 1; lpActs->lpAction[0].lpadrlist->aEntries-> rgPropVals[0].Value.MVbin.lpbin += sizeof(SPropValue)/sizeof(SBinary); memset(&(lpActs->lpAction[0].lpadrlist->aEntries-> rgPropVals[lpActs->lpAction[0].lpadrlist-> aEntries->cValues-1]),254,sizeof(SPropValue)); lpActs->lpAction[0].lpadrlist->aEntries-> rgPropVals[lpActs->lpAction[0].lpadrlist-> aEntries->cValues-1].ulPropTag = PR_RECIPIENT_TYPE; lpActs->lpAction[0].lpadrlist->aEntries-> rgPropVals[lpActs->lpAction[0].lpadrlist-> aEntries->cValues-1].Value.ul = MAPI_TO; } STATUSMicrosoft is researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
MORE INFORMATION
Steps to Reproduce Behavior
Keywords : EDKAPI Version : WINDOWS:5.0 Platform : WINDOWS Issue type : kbprb |
================================================================================
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |