# `mix accrue.mail.preview`
[🔗](https://github.com/szTheory/accrue/blob/accrue-v0.3.0/lib/mix/tasks/accrue.mail.preview.ex#L1)

Renders every `Accrue.Emails.*` type with canned fixtures (D6-08).

Writes outputs to `.accrue/previews/{type}.{html,txt,pdf}`.

## Options

  * `--only <csv>` — render only the listed types (default: all)
  * `--format <html|txt|pdf|both>` — emit specific formats
    (default: `both` — html + txt)

## Examples

    mix accrue.mail.preview
    mix accrue.mail.preview --only receipt,trial_ending
    mix accrue.mail.preview --only receipt --format html
    mix accrue.mail.preview --format pdf

`.accrue/` is git-ignored by convention — see `accrue/.gitignore`.

## PDF rendering

The `--format pdf` / `--format both` (with PDF included) path calls
`Accrue.Billing.render_invoice_pdf/2` against the fixture invoice id.
Since fixtures are pure data with no DB row, PDF rendering is
best-effort: on any adapter error the task logs `skipped` and
continues. Use this task as a template/visual sanity check, not as
a production PDF smoke test.

---

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