To whom it may concern,
we might have stumbled upon a bug in the Aspose.Email component (currently we are using version 22.9 in a C# .Net 7.0 project).
When updating an contact at outlook.office365.com the checkbox “this is the mailing address” is lost, and can not be set again.
doing something simple like this:
Contact con = client.GetContact(OutlookID, ExchangeListContactsOptions.None); con.Events.Birthday = null; con.Events.Anniversary = null; client.UpdateContact(con);
if you first manually set the checkbox in outlook, then after GetContact the property con.PhysicalAddresses.WorkAddress.IsMailingAddress will be correctly read as true, but after the .UpdateContact the value in outlook will be reset to false.
we were unable to set .IsMailingAddress in any way using aspose.
we are currently using 22.9 because of another bug in the following versions, as they can no longer save userproperties for the contacts. so code like
MapiContact _c = blah... ... Guid PS_PUBLIC_STRINGS = new Guid("00020329-0000-0000-C000-000000000046"); MapiProperty stringProperty = new MapiProperty(_c.NamedPropertyMapping.GetNextAvailablePropertyId(MapiPropertyType.PT_UNICODE), System.Text.Encoding.Unicode.GetBytes(_ourValue.ToString())); _c.SetProperty(stringProperty); string stringNameId = "ourcustomproperty"; _c.NamedPropertyMapping.AddNamedPropertyMapping(stringProperty, stringNameId, PS_PUBLIC_STRINGS); _c.SubStorages.Add(stringProperty); sID = client.CreateItem(client.GetMailboxInfo(senderEmail).ContactsUri, _c);
will in later versions longer create that userproperty…
now, from version 23.3 onwards, there is even further regression, as now we are unable to even create that contact in the first place, that we were able to at least create (albeit without said userproperty) with previous versions.
the very same code as above will now throw the following error on .CreateItem:
Aspose.Email.ExchangeException: ‘Operation failed. Response Code: ErrorInvalidRequest, MessageText: The property ‘Values’ was not found for ‘ItemType’ item.’
please advise. Kind regards