PhoenixKit.Install.FinchSetup (phoenix_kit v1.7.33)

Copy Markdown View Source

Handles automatic Finch and HTTP client setup for PhoenixKit installation.

This module provides functionality to:

  • Detect if HTTP client adapters (like AmazonSES, SendGrid, etc.) are being used
  • Automatically add Finch to the application supervisor when needed
  • Add required dependencies like gen_smtp for AWS SES
  • Configure Swoosh API client appropriately

Summary

Functions

Automatically configures Finch and dependencies based on mailer adapter configuration.

Functions

add_finch_configuration(igniter)

Automatically configures Finch and dependencies based on mailer adapter configuration.

This function checks if any HTTP-based email adapters are configured and:

  • Adds Finch to the application supervisor
  • Adds gen_smtp dependency for AWS SES
  • Configures Swoosh API client

Parameters

  • igniter - The igniter context

Returns

Updated igniter with Finch configuration if needed.