Diffusion GpgOL 4c5eed308829

Fix sending PGP/Inline synchronously

Authored by aheinecke on Mar 26 2018, 5:35 PM.

Description

Fix sending PGP/Inline synchronously

* src/common.h: Add error code.
* src/mail.cpp (Mail::update_crypt_mapi): Don't reset crypter
if in sync mode.
(Mail::update_crypt_oom): Reset crypter in sync mode.
* src/mailitem-events.cpp (EVENT_SINK_INVOKE): Check that
states for inline mail are as expected or bug out.

For synchonous inline encrypted the cryptcontroller was
deleted too early. This caused body_to_body to fail and
ultimately lead to an unencrypted mail.

This fixes: