In the application I am writing/using to process messages, I stamp a MAPI property to the message during output as sort of like a “watermark”. This seems to work just fine. However, if I need to reprocess any of those messages, it appears that I can’t “delete” the original watermark, and if I try to create another one, now I have two MAPI properties with the exact same name but different values.
Attaching sample message and code.
Hi Sevag,
You may please use MapiMessage.RemoveProperty() to remove a property from the message. Could you please modify your following code segment and let us know your feedback?
Sample Code:
if (existingProperty != null)
{
//ADD THIS LINE
source.RemoveProperty(existingProperty.Tag);
//COMMENT THE FOLLOWING
// What method should remove named property?
//source.Properties.Remove;
//source.NamedProperties.Remove;
//source.NamedPropertyMapping.Properties.Remove;
}
This works very well and solves my problem. Thank you.
Hi Sevag,
Thank you for sharing your feedback. Please feel free to write to us if you have any further query in this regard.