BambooSes.Message.Content (bamboo_ses v0.3.0) View Source

Contains functions for composing email content. Depending on email it can generate simple, raw or template content.

Link to this section Summary

Functions

Generates simple, raw or template content struct

Link to this section Types

Specs

t() :: %BambooSes.Message.Content{
  Raw: %{Data: String.t()} | nil,
  Simple:
    %{
      Subject: %{Charset: String.t(), Data: String.t() | nil},
      Body: %{
        Text: %{Charset: String.t(), Data: String.t() | nil},
        Html: %{Charset: String.t(), Data: String.t() | nil}
      }
    }
    | nil,
  Template:
    %{
      TemplateName: String.t() | nil,
      TemplateData: String.t() | nil,
      TemplateArn: String.t() | nil
    }
    | nil
}

Link to this section Functions

Link to this function

build_from_bamboo_email(email)

View Source

Specs

build_from_bamboo_email(Bamboo.Email.t()) :: t()

Generates simple, raw or template content struct

Returns

If template params are given then a template content struct will be returned. If email has no attachments and headers then a simple content struct will be returned. If there is an attachment or a header (apart from Reply-To) then raw content struct will be returned.