StrawHat.Mailer v0.2.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
- name: unique identifier (per owner_id) of the template.
- title: Human readable title.
- privacy: Check
StrawHat.Mailer.Template.Privacy.t/0
for more information. - owner_id: The identifier of the owner. We recommend to use combinations
of
system + resource id
. For example:"system_name:resource_id"
or any other combination. The reason behind is that if you use just some resource id, example just"1"
, you can’t use more than one resource that owns the template with the sameid
. - subject: The subject of the email. You can use Mustache template inside for render dynamic content from the data pass to the template.
- html_body: The
html_body
of the email. You can use Mustache template inside for render dynamic 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
- name: unique identifier (per owner_id) of the template.
- title: Human readable title.
- privacy: Check
StrawHat.Mailer.Template.Privacy.t/0
for more information. - owner_id: The identifier of the owner. We recommend to use combinations
of
system + resource id
. For example:"system_name:resource_id"
or any other combination. The reason behind is that if you use just some resource id, example just"1"
, you can’t use more than one resource that owns the template with the sameid
. - subject: The subject of the email. You can use Mustache template inside for render dynamic content from the data pass to the template.
- html_body: The
html_body
of the email. You can use Mustache template inside for render dynamic content from the data pass to the template.
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.