woohaaha

woohaaha

Amazon SES with Bamboo vs ExAws

Has anyone used both Bamboo and ExAws and can comment on the differences?

I would imagine that if I want to integrate with AWS SES than the obvious choice is ExAws even if both libraries (ExAws, Bamboo) are only using SMTP. My concern was that I believe ExAws was briefly deprecated while searching for a new maintainer while Thoughtbot has a great track record for maintaining libraries.

So:

  1. If you have used both or either libraries to send emails from SES I’d like to know your experience and preferences?

  2. Am I missing something in my rationale?

Thank you

Most Liked

nikody

nikody

I have used AWS SES directly with ExAws and the reasons for this choice were mainly that we wanted to avoid additional dependencies - in this case Bamboo, but also its SES adapter. With Bamboo, you have to use different adapters, which are a separate dependency and vary depending on the email delivery service you use.

If you take a look at the code for the SES adapter for Bamboo, you’ll notice it also uses ExAws underneath. Also, there is a notice in the readme for ExAws that it is once more actively maintained, and I haven’t noticed or heard of any problems with it, so I believe it should be fine.

Now, Bamboo’s plus is that it hides a tiny bit of the complexity when composing the emails and if you use just ExAws you should be careful to compose them correctly. Mostly, be careful about the newlines as in some cases two of them are required. For reference, this is similar to what I last used:

"From: #{sender_email}\n" <>
"Return-Path: #{return_path}\n" <>
"To: #{user_email}\n" <>
"Subject: #{subject}\n" <>
"MIME-Version: 1.0\n" <>
"Content-type: #{content_type};charset=UTF-8\n\n" <>
 body

Then you just pipe it to:

 |> ExAws.SES.send_raw_email()
 |> ExAws.request(region: aws_region) # SES is not available in some regions so you might have to use a different one to your standard region

However, another plus in Bamboo’s favour is that it allows for easier testing. The Bamboo.Interceptor behaviour also seems pretty nice. And the Bamboo.SentEmailViewerPlug plug makes it easy to view emails in development.

Ultimately, I believe it depends on if you want these additional features that Bamboo offers or if you prefer to have fewer dependencies.

tomciopp

tomciopp

We use Bamboo and ExAWS in our project, but don’t use ExAWS to integrate with SES. We use the bamboo_smtp adapter for that. This choice was made before ex_aws_ses and an ses adapter for bamboo existed. Testing and configuration for this setup is fairly easy (we set some ENV variables at runtime) and we haven’t noticed any problems with delivery or long term maintenance.

That being said, I would probably use the bamboo_ses adapter if I were coming into a greenfield project. Since it just wraps ex_aws_ses it likely solves all the problems you would have to go through yourself.

Where Next?

Popular in Questions Top

hariharasudhan94
lets say i have a sample like a = 20; b = 10; if (a &gt; b) do {:ok, "a"} end if (a &lt; b) do {:ok, b} end if (a == b) do {:ok, "equa...
New
Tee
can someone please explain to me how Enum.reduce works with maps
New
tduccuong
Hi, is there any work on GUI with Elixir, that is similar to Electron/Javascript? My idea is to bundle Phoenix and BEAM into a single se...
New
minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
Fl4m3Ph03n1x
About me? ( if you have nothing better to do than reading about some random guy in the internet :stuck_out_tongue: ) Hello all, this is ...
New
LegitStack
I’m trying to make a websocket server in Phoenix or raw Elixir. I heard about gun, I think I could use cowboy, but since I’m not that sma...
New
Emily
I have VueJS GUIs with the project generated using Webpack. I have Elixir modules that will need to be used by the VueJS GUIs. I forese...
New
aalberti333
As the title describes, I’m trying to run Enum.map() over a list of key/value pairs, where the value is a map. My data looks like this: ...
New
jason.o
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New
dblack
I’ve got an issue with an app and I’ve no idea of how to troubleshoot it. I’m hoping someone here might have seen something similar. I p...
New

Other popular topics Top

AstonJ
Posting this to see if we can make things easier for people to get into Neovim. If you use Neovim and have a favourite distro please let ...
New
marius95
Hello everyone, I try to use an Javascript Event Handler in my root.html.leex file. Therefore I created a function in the app.js file: ...
New
greenz1
I have a phoenix application from which a user can download multiple(5-6) files of size 1MB. I couldn’t find anything related to sending ...
New
jononomo
I am trying to figure out how Mix knows whether the environment is test, dev, or prod – where is this set? Thanks.
New
nobody
Hi! In PHP: $_SERVER[‘SERVER_ADDR’] - in Elixir? Searched the docs for ip address and the web, no good results. Thanks!
New
jason.o
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New
saif
Hello everyone, Long time lurker first time poster here. I’ve recently begun working on Elixir full-time again! :raised_hands: It’s been...
New
rms.mrcs
Hi, I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list. ...
New
nsuchy
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
JakeBecker
TL;DR: I’ve just released an implementation of Microsoft’s IDE-independent Language Server Protocol for Elixir. It adds language support ...
1144 54120 245
New

Latest on Elixir Forum

Elixir Forum

We're in Beta

About us Mission Statement