rails-mailbox
Installation
SKILL.md
Rails Mailbox
Routing Inbound Emails
- Define all routes in
app/mailboxes/application_mailbox.rbusing theroutingDSL - Prefer scoped routing via sub-addressing (
+tag) to simplify mailbox matching - Use descriptive class names matching route targets (e.g.,
SupportMailbox,BillingMailbox) - Never create a mailbox class without a corresponding route
Mailbox Class Structure
- Each mailbox inherits from
ApplicationMailbox - Implement the
receivemethod to extract data from the inboundmailobject - Avoid side effects in parsing logic; keep extraction and persistence separate
- Always authenticate or verify the sender before performing sensitive actions