BambooSes.Message.Content (bamboo_ses v0.4.7)
View SourceContains functions for composing email content. Depending on email it can generate simple, raw or template content.
Summary
Functions
Generates simple, raw or template content struct
Types
@type 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 }
Functions
@spec 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.