mix accrue.mail.preview (accrue v0.3.0)

Copy Markdown View Source

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.