# `Mutare.Swoosh`
[🔗](https://github.com/foxbenjaminfox/mutare_swoosh/blob/v0.2.1/lib/mutare/swoosh.ex#L1)

Custom Mutare mutators for Swoosh email semantics.

The families mutate email fields often left untested: recipient class,
sender, body part, subject, attachments, custom headers, provider options — and delivery
itself. Each email-field family also mutates matching Swoosh.Email.new/1 options, so both
pipeline construction and compact new options are covered.

    [mutators: [:builtins] ++ Mutare.Swoosh.all()]

`Mutare.Swoosh.Deliver` requires the application's mailer module in its configuration;
set it with `all/1`:

    [mutators: [:builtins] ++ Mutare.Swoosh.all(mailer: MyApp.Mailer)]

Without the option the deliver family produces no mutations (see `Mutare.Swoosh.Deliver`).
`mailer:` takes one module or a list; mutants for all listed mailers are reported under
`:swoosh_deliver` (list `Mutare.Swoosh.Deliver` twice with `as:` to report them separately).

# `all`

```elixir
@spec all() :: [module()]
```

This package's Swoosh mutator families, for splicing into :mutators.

`Mutare.Swoosh.Deliver` is included unconfigured and produces no mutations until its
`mailer:` option is set — use `all/1` (or list the `{Mutare.Swoosh.Deliver, mailer: ...}`
tuple yourself) to activate it.

# `all`

```elixir
@spec all(keyword()) :: [module() | {module(), keyword()}]
```

The same families with `Mutare.Swoosh.Deliver` configured:

    Mutare.Swoosh.all(mailer: MyApp.Mailer)
    Mutare.Swoosh.all(mailer: [MyApp.Mailer, MyApp.AdminMailer])

---

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