# `mix mailglass.doctor`
[🔗](https://github.com/szTheory/mailglass/blob/v2.7.0/lib/mix/tasks/mailglass.doctor.ex#L1)

Run a static webhook-wiring check on the host app's `endpoint.ex`.

Verifies that `Mailglass.Webhook.CachingBodyReader` is wired as the
`:body_reader` on the managed `Plug.Parsers` block. The scan is OFFLINE:
it reads `endpoint.ex` off disk and does NOT boot the host application.

## Usage

    mix mailglass.doctor

## Exit codes (three-state)

  * `0` — CachingBodyReader is wired (webhooks will verify correctly)
  * `1` — CachingBodyReader is absent — run `mix mailglass.install` to fix
  * `2` — cannot diagnose (endpoint.ex not found or OTP app not detectable)

## Notes

This task does NOT start the application (`Mix.Task.run("app.start")` is
deliberately absent). The scan is static so it works inside the install-fixture
harness and in CI without a running database.

---

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