niklasfemerstrand / rc_openpgpjs

OpenPGP for Roundcube via JavaScript
GNU General Public License v2.0
109 stars 45 forks source link

No proper handling on message sending errors #130

Open thomascube opened 11 years ago

thomascube commented 11 years ago

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.