PhoenixKit.Install.MailerConfig (phoenix_kit v2.13.18)

Copy Markdown View Source

Handles mailer configuration for PhoenixKit installation.

This module provides functionality to:

  • Configure development mailer with Swoosh.Adapters.Local
  • Add production mailer templates for various providers
  • Generate appropriate notices for mailer setup

Summary

Functions

Adds PhoenixKit mailer configuration for development and production.

Relocates any config calls that sit above import Config in config/runtime.exs.

Functions

add_mailer_configuration(igniter)

Adds PhoenixKit mailer configuration for development and production.

Now supports both delegation mode and built-in mode:

  • Delegation mode: Configure PhoenixKit to use parent app's mailer
  • Built-in mode: Configure PhoenixKit's own mailer (legacy)

Parameters

  • igniter - The igniter context

Returns

Updated igniter with mailer configuration and notices.

repair_runtime_import_order(igniter)

Relocates any config calls that sit above import Config in config/runtime.exs.

The 2.13.6 installer could write the Local mailer adapter at line 1, which is a CompileError (undefined function config/3) on the next boot. Safe to run on update as well as install: idempotent, no-op when the file is already well-formed or missing.