matcha icon indicating copy to clipboard operation
matcha copied to clipboard

FEAT: Plugin API - email body access in hooks

Open andrinoff opened this issue 7 months ago • 2 comments

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:

  1. Include the email body (plain text) in the email_viewed hook table, or
  2. 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.

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