BambooSes.Message.Content (bamboo_ses v0.5.0)

View Source

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

Summary

Functions

Generates simple or template content struct

Types

t()

@type t() :: %BambooSes.Message.Content{
  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}
      },
      Attachments: [map()] | nil,
      Headers: [map()] | nil
    }
    | nil,
  Template:
    %{
      TemplateName: String.t() | nil,
      TemplateData: String.t() | nil,
      TemplateArn: String.t() | nil
    }
    | nil
}

Functions

build_from_bamboo_email(email)

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

Generates simple or template content struct

Returns

If template params are given then a template content struct will be returned. Otherwise a simple content struct will be returned, with attachments if present.