IsMailingAddress is removed for contacts

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);

works fine.

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

@deltaaccess
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes asap.

Issue ID(s): EMAILNET-41116

@margarita.samodurova Thank you for the reply.
When can we expect the fix?

Regards,

@deltaaccess,

The task is under investigation.

We’re sorry for keeping you wait. Thanks for your patience.

still there is an error as described in the original post, on createitem it fails. currently with slightly different message though:

Operation failed. Response code: ErrorInvalidValueForProperty, Message text: The specified value is invalid for property.

please advise. Kind regards

Hi @deltaaccess ,

Thank you for the information. We’ll check this issue and contact you asap.

Hello @deltaaccess,

We checked the issue on our side, there are no exceptions. Could you please share some sample code to reproduce the issue?

Hello,
when looking a bit deeper into the fields that we map on the MapiContact, the line
_c.PhysicalAddresses.WorkAddress.IsMailingAddress = true;

seems to provoke the error in 23.10 but with the very same code and very same data still works in 22.9, as written in the original post (see code example there). and, as also written in the original post, the userproperty still is not saved to outlook with 23.10, while it works in 22.9.

best regards

Hello @deltaaccess,

Thanks for the clarification, we’re looking into it.

Hello dear Aspose Support Team,
is there any updates?

regards,

Hello,

The request for the issue status has been forwarded to the developers. I will let you know as soon as I get any info.

Thanks.

@deltaaccess
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): EMAILNET-41336

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.