Home GnuPG
Diffusion GpgOL 707250ce6151

Add special sauce for Outlook S/MIME code interact

Description

Add special sauce for Outlook S/MIME code interact

* src/mailitem-events.cpp (EVENT_SINK_INVOKE): Check if after
encryption msgclass is not gpgol on MAPI Message and activate
Hack if otherwise.
* src/windowmessage.cpp (delayed_close, CLOSE): New.
* src/windowmessage.h: Update Accordingly.

If somehow S/MIME is involved in Outlook, even if the S/MIME sign
button is just toggled and untoggled, Outlook changes behavior.
When that happened Send would send the plain text mail instead
of the encrypted mail.

Now this here is very much experimental programming:
When the S/MIME Code is somehow involved the Message in MAPI
(not the base message) is not correctly updated and shows the
original IPM.Note message class. We detect that now.
If that happens we use super low level MAPI to submit our
constructed base message and then cancel the send / close the
composer.