Skip to main content

The client

send_mail and deliver_mail are aliases. email_disposition and message_receipt are aliases.

Building a message

Attachments

Attach files by path using the helper method:
Or set the attachments attribute directly with an array of hashes (each with fileName, contentType, and base64-encoded content):

Send a message

Check delivery status

EmailDisposition fields: Each MessageDelivery struct has recipient and status. The status struct has delivery_status, delivery_time, opened_status, and opened_time. Check disposition.errors? to detect API-level errors. Common delivery_status values: delivered, opened, failed, pending.

Scheduled send

Schedule a message for future delivery, check its status, reschedule, or cancel it.

Schedule a message

scheduled_at must be an ISO 8601 UTC datetime string in the future and within 30 days. schedule_mail accepts a Paubox::Message, a Mail::Message, or a plain hash.

Get scheduled message status

Reschedule a message

Cancel a scheduled message

Dynamic templates

Templates use Handlebars syntax ({{variable_name}}).

Create a template

List templates

Get a template

Update a template

Delete a template

Send a templated message

Error handling

Methods raise RestClient::ExceptionWithResponse on HTTP errors. Rescue it to inspect the response: