Pow v0.1.0-alpha Pow.Phoenix.Mailer behaviour View Source

This is a mailer module that provides an API for any mails that Pow might need to sent.

Usage

defmodule MyAppWeb.Mailer do

use Pow.Phoenix.Mailer
use Swoosh.Mailer, otp_app: :my_app

def cast(email) do
  new()
  |> from({"My App", "myapp@example.com"})
  |> to({"", user.email})
  |> subject(email.subject)
  |> text_body(email.text)
  |> html_body(email.html)
end

def process(email), do: deliver(email)

end

Link to this section Summary

Link to this section Functions

Link to this function deliver(conn, email) View Source
deliver(Plug.Conn.t(), Pow.Phoenix.Mailer.Mail.t()) :: any()

Link to this section Callbacks

Link to this callback cast(arg0) View Source
cast(Pow.Phoenix.Mailer.Mail.t()) :: any()
Link to this callback process(any) View Source
process(any()) :: any()