# `Mailglass.Router`
[🔗](https://github.com/szTheory/mailglass/blob/v1.0.0/lib/mailglass/router.ex#L1)

Router macro for mounting Mailglass unsubscribe endpoints in an adopter
Phoenix router.

## Usage

    defmodule MyAppWeb.Router do
      use Phoenix.Router
      import Mailglass.Router

      scope "/" do
        pipe_through :browser
        mailglass_router_routes "/mailglass"
      end
    end

Generates one GET and one POST route at the configured unsubscribe mount
path, ending in `/:token`.

## Options

  * `:as` - route helper prefix. Default: `:mailglass_unsubscribe`
  * `:mount_path` - explicit absolute mount path override. Intended for
    test-only compile scenarios; normal callers should rely on
    `Mailglass.Config.compliance_mount_path/0`.

# `mailglass_router_routes`
*since 0.2.0* *macro* 

Mounts the core unsubscribe GET and POST routes.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
