# `Mailglass`
[🔗](https://github.com/szTheory/mailglass/blob/v0.1.0/lib/mailglass.ex#L1)

Transactional email framework for Phoenix.

Composes on top of Swoosh, shipping the framework layer Swoosh omits:
HEEx-native components, LiveView preview dashboard, normalized webhook events,
suppression lists, RFC 8058 List-Unsubscribe, multi-tenant routing, and an
append-only event ledger.

## Getting Started

    config :mailglass,
      repo: MyApp.Repo,
      adapter:
        {Mailglass.Adapters.Swoosh,
         swoosh_adapter:
           {Swoosh.Adapters.Postmark, api_key: System.fetch_env!("POSTMARK_API_KEY")}}

## Architecture

See `Mailglass.Config`, `Mailglass.Renderer`, `Mailglass.Components`.

# `deliver`
*since 0.1.0* 

Synchronous delivery. See `Mailglass.Outbound.deliver/2`.

# `deliver!`
*since 0.1.0* 

Bang variant. See `Mailglass.Outbound.deliver!/2`.

# `deliver_later`
*since 0.1.0* 

Asynchronous delivery. See `Mailglass.Outbound.deliver_later/2`.

# `deliver_many`
*since 0.1.0* 

Batch async delivery. See `Mailglass.Outbound.deliver_many/2`.

# `deliver_many!`
*since 0.1.0* 

Bang batch variant. See `Mailglass.Outbound.deliver_many!/2`.

---

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