Prerequisites
- A Sendbaze API key
- A verified domain. A test key works without one, and so does the shared test address for emails to yourself.
- Ruby 3.1 or later
The examples use the standard library
net/http, so nothing needs installing. An official gem is on the roadmap.Guide
1
Set your API key
.env
2
Send an email
send.rb
3
Try it
Run
ruby send.rb and open the dashboard Logs.Examples
A small client
sendbaze.rb
Rails
Use a mailer-style service object from a job so a slow network never blocks a request.app/jobs/send_receipt_job.rb