MailglassInbound.Router (MailglassInbound v0.1.0)

Copy Markdown View Source

Thin router DSL for compiling inbound mailbox routes into pure route data.

A router module declares ordered route/2 entries and exposes the compiled routes through __mailglass_inbound_routes__/0. Runtime matching is handled by MailglassInbound.Router.Matcher, which preserves top-to-bottom, first-match-wins semantics.

Phase 39 intentionally keeps the public matcher surface narrow:

  • :recipient accepts an exact string or regex and matches the envelope recipient.
  • :subject accepts an exact string or regex.
  • :headers accepts {header_name, exact_string_or_regex} tuples.

Summary

Functions

route(mailbox, opts)

(macro)