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.
Not on Hex yet. Open pull requests on postshiba/sdks.
Or pass a client.
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.