Home GnuPG
Diffusion GpgOL 474cc15d8e33

Fix handling of "own" S/MIME Mails


Fix handling of "own" S/MIME Mails

* src/mimedataprovider.cpp (MimeDataProvider::collect_data):
Expect headers if the first line of the data starts with MIME-Version.

This fixes the problem that S/MIME Mails in the sent folder
are not handled.

The problem is that for received S/MIME Mails GpgOL sees
the S/MIME part as the original structure and just needs
to copy this part to gpgol.
But for our own mails in the sent mails folder we get our
MIME Structure that we created for the MAPI to MIME conversion
including headers.

To avoid a big mess with another content type we check the
first bytes of the data we parse if they say "MIME-Version"
in that case we expect MIME headers.