PRB: Sender and Body Lost When Using EDK Rule Component to Forward Message (233983)



The information in this article applies to:

  • Microsoft Exchange Development Kit (EDK) 5.5

This article was previously published under Q233983

SYMPTOMS

When using the Exchange Development Kit (EDK) Rule Component to forward a message to another mailbox or Public Folder, the original message appears in the body of the message, and the "From" line becomes the mailbox that most recently forwarded the message.

CAUSE

The Rule Component does not expose the necessary flags to set this option.

RESOLUTION

To add this to all forward rules, add a line of code to the CAction::pack method in the ActionObj.cpp file, and then recompile Rule.dll. The line of code to add is as follows:
lpAction->ulActionFlavor = 3;
				
The original code looks looks like this:
case ACTION_FORWARD:
case ACTION_DELEGATE:
{
lpAction->acttype = (m_actionType==ACTION_FORWARD)?OP_FORWARD:OP_DELEGATE;
long	cElements=m_uActionArgs.lpAdressList->rgsabound[0].cElements;
				
Your new code should resemble the following:
case ACTION_FORWARD:
case ACTION_DELEGATE:
{
lpAction->acttype =(m_actionType==ACTION_FORWARD)?OP_FORWARD:OP_DELEGATE;
lpAction->ulActionFlavor = 3;
long	cElements=m_uActionArgs.lpAdressList->rgsabound[0].cElements;
				
You may wish to further modify the rule object to take this as an argument.

Modification Type:MinorLast Reviewed:3/4/2004
Keywords:kbMsg kbprb KB233983