Diffusion GpgOL 2216aaecb56f

Fix moving / closing S/MIME mails with attachments

Authored by aheinecke on May 28 2019, 3:17 PM.

Description

Fix moving / closing S/MIME mails with attachments

* src/mail.cpp (Mail::close): Save changes after close
to fix T4525

My understanding of this issue and the fix for
it is that Outlook with exchange detects that our mails
are S/MIME mails. As the attachments are modified by us
outlook wants to save the changes on move.

This fails because it can't do the crypto.
Leading to the error. This also happens when
such a mail is closed.

The trick is to save the mail in MAPI (our
plaintext is only in OOM) so that the message class
becomes a gpgol message class in MAPI.
The problem with that is outlined in T4543