FEAT: Plugin API - email body access in hooks
Is your feature request related to a problem?
The email_viewed hook receives email metadata (uid, from, to, subject, date, is_read) but NOT the email body. Plugins that want to analyze, summarize, or act on email content cannot do so. This limits plugins to metadata-only operations.
Describe the solution you'd like
Either:
- Include the email body (plain text) in the
email_viewedhook table, or - Add a
matcha.get_email_body(uid, account_id)function that fetches the body on demand
Option 2 is preferred as it avoids loading large bodies when plugins don't need them.
Describe alternatives you've considered
Passing the body in the hook table directly. This is simpler but wastes memory/CPU when plugins only care about metadata.
Additional context
This would enable plugins like: email summarizers, link extractors, auto-labelers, content-based notifications, and AI-powered email analysis.
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.