none
EWS Managed API 2.0 - How to add an item attachment RRS feed

All replies

  • Just bind to item and add it normally eg

                    ItemAttachment at = appointment.Attachments.AddItemAttachment<EmailMessage>();
    
                    at.Name = "Attached Message Item";
                    at.Item.Subject = "test";
                    ExtendedPropertyDefinition PR_Flags = new ExtendedPropertyDefinition(3591, MapiPropertyType.Integer);
                    at.Item.SetExtendedProperty(PR_Flags, "1");
                    ((EmailMessage)at.Item).Sender = new Microsoft.Exchange.WebServices.Data.EmailAddress("fred@blah.com");
                    ((EmailMessage)at.Item).ToRecipients.Add("user@domaincom");
                    appointment.Update(ConflictResolutionMode.AlwaysOverwrite);
    Cheers
    Glen
    Monday, March 4, 2013 6:09 AM