Sending personalized email to Amazon SES

I’ve been playing around with Bamboo. Instead of sending the email template with its data, Is there anyway in Bamboo to send just only the data of the personalized template to SES (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-personalized-email-api.html)? Or any elixir libraries that can do that?

Like this for example:

{
  "Source": "sender@example.com",
  "Template": "MyTemplate",
  "ConfigurationSetName": "ConfigSet",
  "Destination": {
    "ToAddresses": [ "alejandro.rosalez@example.com"
    ]
  },
  "TemplateData": "{ \"name\":\"Alejandro\", \"favoriteanimal\": \"alligator\" }"
}
1 Like

I am not versed in SES but both Bamboo and Swoosh simply return structs (that’s before calling any sending functions). I imagine it’s extremely easy to convert one struct to another like in your example.

But I am misunderstanding – where’s your struggle exactly? In how to work with the SES API?

Check this out! https://github.com/ex-aws/ex_aws and https://github.com/ex-aws/ex_aws_ses
ExAws.SES returns a Query
and Send it via ExAws.request(_query)

1 Like