MsgKit was throwing an exception while trying to convert .eml not having a date set (not sent yet).
I was generating .eml using simple python script, but they couldn't be converted by MsgKit because MsgKit was setting the SentOn date to 01.01.0001, then when writing as a .msg is was throwing 'Invalid Win32 Time'.
My fix is to avoid setting the SentOn when the date is 01.01.0001, luckily your code had SentOn nullable and the writing to .msg made proper use of that.
Note: The AppVeyor build is broken, not related to my commit which is building fine on VS2022 and is just a nice and simple fix without side effect on what was working.
MsgKit was throwing an exception while trying to convert .eml not having a date set (not sent yet).
I was generating .eml using simple python script, but they couldn't be converted by MsgKit because MsgKit was setting the SentOn date to 01.01.0001, then when writing as a .msg is was throwing 'Invalid Win32 Time'.
My fix is to avoid setting the SentOn when the date is 01.01.0001, luckily your code had SentOn nullable and the writing to .msg made proper use of that.