FEAT: Plugin API - missing lifecycle hooks (delete/archive/move)
Is your feature request related to a problem?
The plugin hook system only has 8 events: startup, shutdown, email_received, email_viewed, email_send_before, email_send_after, folder_changed, composer_updated. There are no hooks for destructive/organizational email actions, so plugins can't react to email lifecycle changes.
Describe the solution you'd like
Add the following hooks to plugin/hooks.go:
email_deleted— called when an email is deleted (with uid, account_id, folder)email_archived— called when an email is archivedemail_moved— called when an email is moved (with source and destination folder)attachment_downloaded— called when an attachment is saved
Describe alternatives you've considered
Polling-based approach where plugins periodically check folder contents. This is inefficient and misses the specific action taken.
Additional context
These hooks would enable plugins like: deletion audit logs, sync with external task managers (e.g. mark task complete when email archived), analytics dashboards, and backup plugins.
This has had no activity for 30 days. It will be closed in 14 days unless updated. Comment or remove the stale label to keep it open.
Closing due to inactivity. Reopen if still relevant.