tags:

views:

27

answers:

0

I have a custom class that is derived from Post called: "IPM.Post.CustomType" I have these items in the inbox and I'm trying to set the to field to show recipients. I've tried setting the following properties with no success. Any ideas? Or if I'm using a post item, will the to field always display as empty in Outlook?

        OutlookItem.PropertyAccessor.SetProperty("urn:schemas:httpmail:displayto", "blah");


        var aixStoreAccessor = new AddinExpress.MAPI.ADXMAPIStoreAccessor();
        aixStoreAccessor.Initialize(false);
        var aixItem = aixStoreAccessor.GetMapiItem(OutlookItem);
        aixItem.SetProperty(AddinExpress.MAPI.ADXMAPIPropertyTag._PR_DISPLAY_TO, "1");
        aixItem.SetProperty(AddinExpress.MAPI.ADXMAPIPropertyTag._PR_DISPLAY_TO_A, "2");
        aixItem.SetProperty(AddinExpress.MAPI.ADXMAPIPropertyTag._PR_DISPLAY_TO_W, "3");
        aixItem.SetProperty(AddinExpress.MAPI.ADXMAPIPropertyTag._PR_ORIGINAL_DISPLAY_TO, "4");
        aixItem.SetProperty(AddinExpress.MAPI.ADXMAPIPropertyTag._PR_ORIGINAL_DISPLAY_TO_A, "5");
        aixItem.SetProperty(AddinExpress.MAPI.ADXMAPIPropertyTag._PR_ORIGINAL_DISPLAY_TO_W, "6");
        aixItem.SetProperty(0x00008536, "7"); // PidLidNonSendableTo http://msdn.microsoft.com/en-us/library/ee201451(EXCHG.80).aspx
        aixItem.SetProperty(AddinExpress.MAPI.ADXMAPIPropertyTag._PR_RECEIVED_BY_NAME, "8");
        aixItem.SetProperty(AddinExpress.MAPI.ADXMAPIPropertyTag._PR_RECEIVED_BY_NAME_A, "9");
        aixItem.SetProperty(AddinExpress.MAPI.ADXMAPIPropertyTag._PR_RECEIVED_BY_NAME_W, "10");
        aixStoreAccessor.LogOff();