Bamboo.SesAdapter (bamboo_ses v0.4.6)

View Source

Sends email using AWS SES API v2.

Use this adapter to send emails through AWS SES API v2.

Summary

Functions

Implements Bamboo.Adapter callback

Implements Bamboo.Adapter callback

Set the SES configuration set name.

Set the SES feedback forwarding address

Set the SES feedback forwarding address arn

Set the SES FromEmailAddressIdentityArn.

Implements Bamboo.Adapter callback

Functions

deliver(email, config)

Implements Bamboo.Adapter callback

handle_config(config)

Implements Bamboo.Adapter callback

set_configuration_set(mail, configuration_set_name)

Set the SES configuration set name.

Example

email
|> Bamboo.SesAdapter.set_configuration_set("my-configuration-set")

set_email_tags(mail, email_tags)

Set email tags

Example

email_tags = [
  %{
    "Name" => "color",
    "Value" => "red"
  },
  %{
    "Name" => "temp",
    "Value" => "cold"
  }
]
email
|> Bamboo.SesAdapter.set_email_tags(email_tags)

set_feedback_forwarding_address(mail, address)

Set the SES feedback forwarding address

Example

email
|> Bamboo.SesAdapter.set_feedback_forwarding_address("FEEDBACK FORWARDING ADDRESS")

set_feedback_forwarding_address_arn(mail, arn)

Set the SES feedback forwarding address arn

Example

email
|> Bamboo.SesAdapter.set_feedback_forwarding_address_arn("FEEDBACK FORWARDING ADDRESS ARN")

set_from_arn(mail, from_arn)

Set the SES FromEmailAddressIdentityArn.

Example

email
|> Bamboo.SesAdapter.set_from_arn("SOME ARN")

set_list_management_options(mail, contact_list_name, topic_name)

Set the SES list management options

Example

email
|> Bamboo.SesAdapter.set_list_management_options("a contact list name", "a topic name")

set_template_params(mail, template_name, template_data, template_arn \\ nil)

Set the SES template params: name, data, ARN

Example

template_data = Jason.encode!(%{subject: "My subject", html: "<b>Bold text</b>", text: "Text"})

email
|> Bamboo.SesAdapter.set_template_params("my-template", template_data)

# or with template ARN
email
|> Bamboo.SesAdapter.set_template_params("my-template", template_data, "TEMPLATE ARN")

supports_attachments?()

Implements Bamboo.Adapter callback