Access violation when importing MSG
I am trying to import MSG file(s) into a folder of an Internet Folders store (an IMAP account). When I open the target folder and execute Folder > Import > From MSG... with Load message into current folder style, MFCMapi throws access violation at:
https://github.com/microsoft/mfcmapi/blob/2973607bfd344912a368f0148990d616c617f1a6/core/mapi/mapiFile.cpp#L128
with the following call stack:
PSTPRX32.DLL!CImapSyncManager::HrSyncFolder(struct _feid *,struct IMAPIProgress *,int,int,unsigned long *)
PSTPRX32.DLL!CIMAPFolderProxy::EmIIMAPFolder::OnFolderChanged(void)
PSTPRX32.DLL!CIMAPMessageProxy::OnFolderChanged(void)
PSTPRX32.DLL!CIMAPMessageProxy::EmIIMAPMessage::CheckPoint(unsigned long)
PSTPRX32.DLL!CIMAPMessageProxy::SaveChanges(unsigned long)
MFCMapi.exe!file::LoadFromMSG::__l14::<lambda_2>::operator()()
MFCMapi.exe!file::LoadFromMSG(const std::wstring & szMessageFile={...}, IMessage * lpMessage=0x000002788542cb08, HWND__ * hWnd=0x00000000000f0c20)
MFCMapi.exe!dialog::CFolderDlg::OnLoadFromMSG::__l18::<lambda_2>::operator()()
Interestingly the message does actually appear in the store and I can see it in the Outlook, however, restarting MFCMapi and logging into a session after each file is slightly inconvenient, as I have thousands files to import.
Anything I can do? I tried to pass various flags to SaveChanges but it did not help.
(I can drag & drop the MSG files into the folder using Outlook, however, they will have received dates of the import, not of the original files.)
MFCMAPI version 16.0.0.1044 Outlook Version: 16.0.16811.20004