In C#, using a licensed version from 2016, just upgraded to the latest, and it broke the API pretty good. Used to be able to set UserProperties (storing a number Id to find a sent email later) from a C# client that launched Outlook. Then fetching from EWS on a service I could get the value from the Exchange server to then find that email specifically.
The client does this:
public void Set(int aId, Microsoft.Office.Interop.Outlook.MailItem aMessage)
Microsoft.Office.Interop.Outlook.UserProperty property = aMessage.UserProperties[_PropertyName];
if (property == null) property = aMessage.UserProperties.Add(_PropertyName, Microsoft.Office.Interop.Outlook.OlUserPropertyType.olText, System.Type.Missing, System.Type.Missing); property.Value = aId.ToString(); aMessage.Save(); }
Then later in Aspose after fetching from EWS:
Aspose.Email.MailMessage.Headers[“SomePropertyName”] since when I fetched I could just pass a string property name to the extended properties parameter.
What is the new way to do this? The user has to launch Outlook so they can tweak their email, send it, then I want to grab it on the backend later and upload the actual email they sent to our doc management system to prove they sent it for auditing/regulatory reasons.
Thanks! Been using Aspose licensed for over 10 years!