StrawHat.Mailer v0.4.1 StrawHat.Mailer.Schema.Template View Source

Represents a Template Ecto Schema with functionality about the data validation for Template.

Link to this section Summary

Types

t()
  • name: unique identifier (per owner_id) of the template.
  • title: Human readable title.
  • privacy: Check StrawHat.Mailer.Schema.Privacy.t/0 for more information.
  • owner_id: Check StrawHat.Mailer.owner_id/0 for more information.
  • subject: The subject of the email. You can use Mustache template inside for render dynamic content from the data pass to the template.
  • pre_header: The pre_header of the email. You can use Mustache template inside for render dynamic html content from the data pass to the template.
  • html: The html of the email. You can use Mustache template inside for render dynamic html content from the data pass to the template.
  • text: The text of the email. You can use Mustach template inside for render dynamic html content from the data pass to the template

Check t type for more information about the keys

Functions

Validate the attributes and return a Ecto.Changeset for the current Template

Link to this section Types

Link to this type t() View Source
t() :: %StrawHat.Mailer.Schema.Template{__meta__: term(), html: String.t(), id: term(), name: String.t(), owner_id: StrawHat.Mailer.owner_id(), partials: term(), pre_header: String.t(), privacy: StrawHat.Mailer.Schema.Privacy.t(), subject: String.t(), text: String.t(), title: String.t()}
  • name: unique identifier (per owner_id) of the template.
  • title: Human readable title.
  • privacy: Check StrawHat.Mailer.Schema.Privacy.t/0 for more information.
  • owner_id: Check StrawHat.Mailer.owner_id/0 for more information.
  • subject: The subject of the email. You can use Mustache template inside for render dynamic content from the data pass to the template.
  • pre_header: The pre_header of the email. You can use Mustache template inside for render dynamic html content from the data pass to the template.
  • html: The html of the email. You can use Mustache template inside for render dynamic html content from the data pass to the template.
  • text: The text of the email. You can use Mustach template inside for render dynamic html content from the data pass to the template.
Link to this type template_attrs() View Source
template_attrs() :: %{name: String.t(), title: String.t(), subject: String.t(), owner_id: StrawHat.Mailer.owner_id(), privacy: StrawHat.Mailer.Schema.Privacy.t(), pre_body: String.t(), html: String.t(), text: String.t()}

Check t type for more information about the keys.

Link to this section Functions

Link to this function changeset(template, template_attrs) View Source
changeset(t(), template_attrs()) :: Ecto.Changeset.t()

Validate the attributes and return a Ecto.Changeset for the current Template.