Home GnuPG
Diffusion GpgOL 39f1abce9009

Change PGP/Inline behavior


Change PGP/Inline behavior

* src/mail.cpp (Mail::append_to_inline_body): New.
(Mail::inline_body_to_body): Put cached body into oom body.
* src/mail.h: Update accordingly.
* src/mailitem-events.cpp (EVENT_SINK_INVOKE): Call inline_body_to_body.
* src/mimemaker.cpp (sink_string_write): New.
(finalize_message): Don't change message class for inline.
(create_top_encryption_header): No MIME header for inline.
(mime_encrypt): Use sink_string_write if inline.

Instead of our nice trick to do the S/MIME to MIME conversion
with a text/plain part we now update the body. This is because
Exchange Online did not like our trick. The new code should
be a bit more robust.

And yes caching stuff in the mail object is my hammer.