When composing a message in Roundcube and sending it encrypted and/or signed, the sending not succeed due to a server error (e.g. SMTP failure). In such cases, the message content remains encrypted and isn't editable for the user anymore. In case one only signed the message, the PGP signature remains and upon sending again, gets signed another time.
The plugin should catch message sending failures and restore the plain text message content. Unfortunately, there's no direct plugin hook or event emitted in such cases. On the client side, one could catch the 'message' event and check for e.type == 'error' or catch send errors on the server side using 'message_before_send' and 'write_log' plugin hooks. The best solution, however, would be to add a 'message_send_error' plugin hook to Roundcube core which the plugin could use to notify the client about failures.
When composing a message in Roundcube and sending it encrypted and/or signed, the sending not succeed due to a server error (e.g. SMTP failure). In such cases, the message content remains encrypted and isn't editable for the user anymore. In case one only signed the message, the PGP signature remains and upon sending again, gets signed another time.
The plugin should catch message sending failures and restore the plain text message content. Unfortunately, there's no direct plugin hook or event emitted in such cases. On the client side, one could catch the 'message' event and check for e.type == 'error' or catch send errors on the server side using 'message_before_send' and 'write_log' plugin hooks. The best solution, however, would be to add a 'message_send_error' plugin hook to Roundcube core which the plugin could use to notify the client about failures.