Do not send an item with encryption errors
* mailitem-events.cpp (MailItemEvents::Invoke): Handle crypto errors. (request_send): New. Sleep for 50ms and then request a send. (sign_encrypt_item): Renamed from handle_after_write. Remove not working context window lookup. Return errors. (handle_before_read): Remove context window lookup.
The first send event is not canceled. We then encrypt / sign
the message in the AfterWrite event and then use Windowmessages
to request a Send again in the main thread. We need to yield
to the main thread for a bit so that it can do some stuff that
allows us to trigger Send again. Otherwise we will get an error
that calling Send is not allowed in this context.