Access is invite-only during beta. Once invited, create a key to personalize these examples. Production sending requires a separate review.

Send emails with Phoenix

Set the Swoosh adapter to PostShiba.Swoosh.Adapter.

PostShiba.Swoosh.Adapter maps a Swoosh.Email to emails.send. Add :swoosh in your app. The core client compiles without it. The mapper copies from, to, subject, html, text, and attachments.

config.exs
1 config :my_app, MyApp.Mailer,
2 adapter: PostShiba.Swoosh.Adapter,
3 api_key: System.get_env("POSTSHIBA_API_KEY"),
4 team_id: "KjkAJW"

Installation

Add to mix.exs.

mix.exs
1 {:postshiba, git: "https://github.com/postshiba/postshiba-elixir.git"}

Not on Hex yet. Open pull requests on postshiba/sdks.

Or pass a client.

client.exs
1 config :my_app, MyApp.Mailer,
2 adapter: PostShiba.Swoosh.Adapter,
3 client: PostShiba.new(System.get_env("POSTSHIBA_API_KEY"), nil, 1)

Errors and throttling

Failed responses raise %PostShiba.Error{} with error, field, and message.

A 429 with error throttled means the cluster hit its hourly throttle or its 24-hour cap. Do not retry that send immediately. Immediate retries hit the same cap.

The Swoosh adapter does not delay for you. In a queued job, catch %PostShiba.Error{} and check error.error == "throttled" before sending again.

See Errors.

About

PostShiba is the email platform that powers Bento behind the scenes. You can build your own products, like Bento, on top of it.

© 2026 PostShiba by Backpack Internet Pty. Ltd. All rights reserved.

The same policies that govern Bento are applied to PostShiba Privacy | Terms | Security