Description

A few days ago I installed Gpg4win-3.1.11 with Kleopatra and the Outlook Office 365 plugin GpgOL.
I already have send a lot of e-mail, some digitally signed, some also encrypted. So far so good. From most recipients I know they received my message in good order. However, some replied with: "hey, why did you send me an empty mail...?"

I observe the same problem since I installed gpg4win 3.1.11 (german) in Outlook, Office Professional Plus 2019, Version 2004: Occasionally "zero byte mails" are sent by replying to an s/mine certified and encrypted mail. In my case the option s/mine support is disabled in GpgOL menu.

Thanks for the report. I can reproduce this by replying to S/MIME enc & sign mails.

There is special code in GpgOL to handle the case that S/MIME sign & encrypt was selected in Outlook before GpgOL secure was triggered. And outlook also does the if you reply to an encrypted S/MIME Mail the reply will also have encrypt selected.
The internal data in Outlook is different in this case. This seems to be broken somehow.

Basically the whole what if you both select outlooks internal encrypt and gpgol's encrypt needs better error handling / warnings as this does not work well.

Ok so I found out that you could even trigger this bug without persistent options just by activating and deactivating any S/MIME option on a mail. This somehow changed the behavior of Outlook.

I now detect a result of the changed behavior and activate a special trick to send the encrypted mail. As that trick relies just on my experiments and not on documented behavior I only activate it If the changed behavior is detected and not unconditionally. This should minimize the regression risk.