AppointmentStateFlags missing when save a all day MapiCalendar to MSG file

Hello guys,
I’m using C# with Apose.Email 20.2 to handle calendar items in PST.
If an all day MapiCalendar is saved to a MSG file,
the value of property AppointmentStateFlags (KnownPropertyList.AppointmentStateFlags) will be missed in MSG file.

MapiCalendar calendar;
MemoryStream ms;

calendar.Save(ms, Aspose.Email.Calendar.AppointmentSaveFormat.Msg);

After saving, the value of AppointmentStateFlags in this message is not existed any more. It’s quite strange since the issue only occurred with all day events.
Could someone help me on this ?
Thanks,

@xieming95at163.com,
Thank you for the query. There were many updates after version 20.2. Please check this problem with the latest version of Aspose.Email.

If the issue persists, please share the following:

  • input PST file
  • comprehensive code example reproducing the problem
  • output MSG file

Hello,
Code samples here:
var ps = PersonalStorage.FromFile(@“F:\test.pst”);
var folders = ps.RootFolder.GetSubFolders();
var calendarFolder = folders.Find(f => f.DisplayName.Equals(“Calendar”, StringComparison.OrdinalIgnoreCase));
var items = calendarFolder.GetContents();
foreach (var i in items)
{
try
{
var message = ps.ExtractMessage(i);
var calendar = message.ToMapiMessageItem() as MapiCalendar;
var property = calendar.GetProperty(KnownPropertyList.AppointmentStateFlags);
calendar.Save(“F:\allday.msg”, Aspose.Email.Calendar.AppointmentSaveFormat.Msg);
var mapiMessage = MapiMessage.Load(“F:\allday.msg”, new MsgLoadOptions() { PreserveTnefAttachments = true });
var newProperty = mapiMessage.GetProperty(KnownPropertyList.AppointmentStateFlags);
}
catch (Exception ex)
{
//ignored
}
}

property is 1 while after reloading, newProperty is 0.

Thanks

Sample file here:
allday.zip (18.0 KB)
And i upgrade my dll to 21.4 but it still not working well now.
Thanks,

@xieming95at163.com,
Thank you for the additional information. I reproduced the problem and logged the issue with ID EMAILNET-40252 in our tracking system. Our development team will investigate this case. You will be notified when it is fixed.

Hello,
Is there any updates for this issue?

@xieming95at163.com,
I requested news on this issue from our development team. I will let you know as soon as possible.

@xieming95at163.com,
This issue will be fixed in Aspose. Email 21.6.

Hello @Andrey_Potapov,
That’s good news. Thanks for the update.

The issues you have found earlier (filed as EMAILNET-40252) have been fixed in this update.