Scaffolds an inbound mailbox and wires it into your router.
Generates three things:
- A mailbox module implementing
MailglassInbound.Mailboxwith a defaultprocess/1that returns the neutral:acceptoutcome. - A route stub in the configured router, inserted idempotently via the same
helper that backs
mix mailglass.gen.inbound_route. - An ExUnit test stub that
use MailglassInbound.MailboxCase.
If the configured router module is not found, an actionable notice is emitted
instead of auto-creating one — run mix mailglass.gen.inbound_router first.
Examples
mix mailglass.gen.mailbox MyApp.Inbound.Support
mix mailglass.gen.mailbox MyApp.Inbound.Support --recipient support@example.com
mix mailglass.gen.mailbox MyApp.Inbound.Support --router MyApp.InboundRouterPositional arguments
mailbox- the mailbox module to create.
Options
--router- the router to add the route stub to. Defaults to<App>.InboundRouter.--recipient- the recipient matcher for the route stub. Defaults to<underscored-mailbox-name>@example.com.
--dry-run is supported as the framework-provided global switch (it is not
in this task's option schema); it previews the diff and writes nothing.