Pow.Phoenix.Mailer.Template (Pow v1.0.25) View Source

Module that builds mailer templates for Phoenix views using EEx with Phoenix.HTML.Engine.

Usage

defmodule PowExtension.Phoenix.Mailer.MailTemplate do
  use Pow.Phoenix.Mailer.Template

  template :mail, "Subject line", "Text content", "<p>HTML content</p>"
end

Link to this section Summary

Link to this section Functions

Link to this macro

template(action, subject, text, html)

View Source (macro)

Specs

template(atom(), binary(), binary(), binary()) :: Macro.t()

Generate template methods.

This macro that will compile a mailer template from the provided binaries, and add the compiled versions to render/2 methods. The text/1 and html/1 outputs the binaries. A subject/1 method will be added too.