matcha icon indicating copy to clipboard operation
matcha copied to clipboard

FEAT: Plugin API - missing lifecycle hooks (delete/archive/move)

Open andrinoff opened this issue 7 months ago • 2 comments

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 archived
  • email_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.

andrinoff avatar Apr 15 '26 19:04 andrinoff

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.

floatpanebot avatar May 16 '26 05:05 floatpanebot

Closing due to inactivity. Reopen if still relevant.

floatpanebot avatar May 30 '26 05:05 floatpanebot