Elixir email libraries - Bamboo vs Swoosh?

What are everyone’s thoughts on these two email libraries? Quality features? Pain points? Speed / ram usage / are they using IO lists?

Both seem to enjoy a decent level of popularity.

4 Likes

Just by looking at the descriptions Swoosh comes with a couple of nice features - SMTP and preview in browser.

Looks like Phoenix uses Bamboo: http://www.phoenixframework.org/docs/sending-email

With Rails I would just set the delivery method to use sendmail and it just works on my server - can we do this with Phoenix?

2 Likes

For waht its worth, Bamboo doesn’t do attachments at the moment.

1 Like

Bamboo has a pretty nice API and comes with a nice SentEmailViewerPlug which allows you to view sent e-mails in the browser during development. It’s kind of silly that they don’t include SMTP in the default set of adapters, though.

2 Likes

mailman also deserves mentioning…

and even phoenix_mjml for mjml templating https://hex.pm/packages/phoenix_mjml

haven’t done any emails yet with phoenix so no experience…

1 Like

Mjml looks interesting. Hadn’t heard of that.

I use mailman, but you need to use this fork https://github.com/benwilson512/mailman at the moment if you want to use newer versions of Elixir

2 Likes

Please note that this fork is 100% for my own usage, it is not intended to be a community wide fork. If it works for you, great, but I’m not supporting a community fork here even a little.

1 Like

Ahh yeah, I should have included that caveat. I’m looking at Swoosh to see if it meets my needs. If it doesn’t, I’m considering forking Mailman myself. In the meantime I’m using your fork @benwilson512, no support suspected.

And for what it’s worth today it seems no longer to be the case: https://hexdocs.pm/bamboo/Bamboo.Attachment.html

1 Like

Any thoughts on swoosh vs bamboo nowadays?

1 Like

+1 as seems Phoenix switched to Swoosh so would like to know the reasoning/advantages to consider whether to do the same…

Phoenix never switched to swoosh, it didn’t use Bamboo before. I’d also wonder if there went much thought into selecting swoosh initially given how similar those two are.

Ah, maybe it was only a mention in the guides: https://web.archive.org/web/20170520211655/http://www.phoenixframework.org/docs/sending-email

Bamboo doesn’t support the new layouts/format approach yet so you can’t as easily put your template next to your logic.

They both can do async and don’t prescribe anything, although I like Swoosh’s approach a bit better.

We use Bamboo currently. We might switch eventually but for now it’s fine.

For new stuff I’ve just stuck with Swoosh, especially since the generators already have it. Biggest killer though has been the mjml library. It makes it all much easier