MapiCalendar not honouring MAPI properties when generating MIME

I want to generate the MIME from a collection of MAPI properties. I’m doing this by creating a MapiCalendar object, populating its MAPI properties and saving as MIME, but I find some MAPI properties are honoured and some are not. For instance, the start time of a calendar item in the MIME output is only ever taken from the StartDate property on the calendar item and not overwritten by the MAPI property for start date - but the MIME subject is always the same as the MAPI property for subject.

Here’s some code to illustrate:

using System.Text;
using Aspose.Email.Calendar;
using Aspose.Email.Mapi;

const int PR_START_DATE = 0x00600040;
const int PR_SUBJECT = 0x0037001F;

using var stream = new MemoryStream();
var cal = new MapiCalendar();

cal.StartDate = new DateTime(2011, 1, 1, 1, 1, 1);
cal.Subject = "Subject from object property";

cal.SetProperty(new PidTagPropertyDescriptor(PR_START_DATE), new DateTime(2012, 2, 2, 2, 2, 2));
cal.SetProperty(new PidTagPropertyDescriptor(PR_SUBJECT), "Subject from MAPI property");

cal.Save(stream, AppointmentSaveFormat.Ics);

// Generated MIME includes the lines:
//      DTSTART:20110101T010101
//      SUMMARY:Subject from MAPI property
// So it's taken the MAPI version of the subject but object property for start date

Is there a way to “synchronize” the calendar object’s properties to the MAPI property values, so that the MIME accurately reflects the MAPI properties. If not, what’s the point of being able to save a MAP object as MIME if it ignores most of the properties?

I’ve examined the MAPI properties on a calendar item and found 6 properties that have the same value as the start date and have set all of these on the calendar item but none of them influence the start date of the calendar item in the generated MIME.

We’re in the process of purchasing Aspose.Email, so I may shortly be able to redirect the question to the paid support route.

Hello @RobertHunt,

You’re right, the MAPI property collection must be in sync with the MapiCalendar property values. It looks like some properties were missed. I created a task EMAILNET-40922 to fix this bug.
Thank you.

This may also be the case with the email address of a contact.

Can I ask what’s the progress of this, and are you fixing it on a property-by-property basis or will it fix it for all properties?

Hello @RobertHunt,

We are fixed issue for all MapiCalendar properties. The fix is available in the latest version of Aspose.Email.

As for MapiContact, we will create a ticket to fix this as well.

Thank you.

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-40958

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.

Thanks for the swift response. My company has been going through contract negotiations with your legal team about getting purchasing a contract for about a month now, but as soon as that’s complete I’ll take that route to raise issues like this.