User notification system for PhoenixKit authentication workflows.
This module handles email delivery for user authentication and account management workflows, including account confirmation, password reset, and email change notifications.
Email Types
- Confirmation instructions: Sent during user registration
- Password reset instructions: Sent when user requests password reset
- Email update instructions: Sent when user changes their email address
Configuration
Configure your mailer in your application config:
config :phoenix_kit, PhoenixKit.Mailer,
adapter: Swoosh.Adapters.SMTP,
# ... other adapter configurationCustomization
Override this module in your application to customize email templates and delivery behavior while maintaining the same function signatures.
Summary
Functions
Deliver instructions to confirm account.
Deliver magic link registration instructions.
Deliver a "new login detected" security alert.
Deliver organization invitation email to a new (unregistered) user.
Deliver instructions to reset a user password.
Deliver instructions to update a user email.
Functions
Deliver instructions to confirm account.
Uses the 'register' template from the database if available, falls back to hardcoded template if not found.
Deliver magic link registration instructions.
Uses the 'magic_link_registration' template from the database if available, falls back to hardcoded template if not found.
Deliver a "new login detected" security alert.
Sent by PhoenixKit.Users.LoginAlerts when a login is seen from a
device (IP + user-agent pair) not previously associated with the
account. attrs carries :ip_address, :browser, :os (either may be
nil), :location (a "City, Country" string, or nil if geolocation
didn't resolve), and :first_seen_at (a DateTime).
Uses the 'new_login_alert' template from the database if available, falls back to hardcoded template if not found.
Deliver organization invitation email to a new (unregistered) user.
Sends a registration link containing the invitation token so the invitee can register and automatically join the organization on email confirmation.
Deliver instructions to reset a user password.
Uses the 'reset_password' template from the database if available, falls back to hardcoded template if not found.
Deliver instructions to update a user email.
Uses the 'update_email' template from the database if available, falls back to hardcoded template if not found.