# `PhoenixKit.Email.Provider`
[🔗](https://github.com/BeamLabEU/phoenix_kit/blob/v1.7.87/lib/phoenix_kit/email/provider.ex#L1)

Unified email provider behaviour.

Covers interception (pre/post send hooks), DB templates, AWS config,
and provider detection. The emails package implements this fully.
The DefaultProvider is a no-op that passes emails through unchanged.

# `adapter_to_provider_name`

```elixir
@callback adapter_to_provider_name(atom(), String.t()) :: String.t()
```

# `aws_configured?`

```elixir
@callback aws_configured?() :: boolean()
```

# `get_active_template_by_name`

```elixir
@callback get_active_template_by_name(String.t()) :: map() | nil
```

# `get_aws_access_key`

```elixir
@callback get_aws_access_key() :: String.t()
```

# `get_aws_region`

```elixir
@callback get_aws_region() :: String.t()
```

# `get_aws_secret_key`

```elixir
@callback get_aws_secret_key() :: String.t()
```

# `get_source_module`

```elixir
@callback get_source_module(map()) :: String.t() | nil
```

# `handle_after_send`

```elixir
@callback handle_after_send(Swoosh.Email.t(), {:ok, any()} | {:error, any()}) :: :ok
```

# `intercept_before_send`

```elixir
@callback intercept_before_send(
  Swoosh.Email.t(),
  keyword()
) :: Swoosh.Email.t()
```

# `render_template`

```elixir
@callback render_template(map(), map()) :: map()
```

# `render_template`

```elixir
@callback render_template(map(), map(), String.t()) :: map()
```

# `send_test_tracking_email`

```elixir
@callback send_test_tracking_email(String.t(), String.t() | nil) ::
  {:ok, Swoosh.Email.t()} | {:error, any()}
```

# `track_usage`

```elixir
@callback track_usage(map()) :: :ok
```

# `current`

```elixir
@spec current() :: module()
```

Returns the configured email provider module, defaulting to DefaultProvider.

---

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