View Source Bonfire.Me.Mails (Bonfire v0.9.10-classic-beta.169)

Handles email sending functionality for accounts and users

Summary

Functions

Sends a confirmation email based on the specified action.

Sends a password reset email.

Sends a confirmation email for user signup.

Functions

Link to this function

confirm_email(account, opts \\ [])

View Source

Sends a confirmation email based on the specified action.

Parameters

  • account: The %Account{} struct for the user.
  • opts: Options including :confirm_action, which determines the type of email to send.

Examples

iex> Bonfire.Me.Mails.confirm_email(%Account{})
# sends signup confirmation

iex> Bonfire.Me.Mails.confirm_email(%Account{}, confirm_action: :forgot_password)

iex> Bonfire.Me.Mails.confirm_email(%Account{}, confirm_action: :forgot_password)
Link to this function

forgot_password(account)

View Source

Sends a password reset email.

Parameters

  • account: The %Account{} struct for the user.

Examples

iex> Bonfire.Me.Mails.forgot_password(%Account{email: %{confirm_token: "token"}})
:ok
Link to this function

render(email, template, assigns \\ [])

View Source
Link to this function

signup_confirm_email(account)

View Source

Sends a confirmation email for user signup.

Parameters

  • account: The %Account{} struct for the user.

Examples

iex> Bonfire.Me.Mails.signup_confirm_email(%Account{email: %{confirm_token: "token"}})