How it works
Your application calls the SDK, the SDK calls the BosonMail API over HTTPS, and BosonMail routes the message to the recipient’s mail servers. The SDK uses two endpoints:POST /emails/sendto submit a messageGET /emails/:id/statusto look up its current state
The SDK source code calls
POST /emails/send. The README lists POST /mail/send, which is pending confirmation by BosonWare. The code is authoritative.BosonMail platform facts
Key concepts
Submission vs delivery
When you callsendEmail, the SDK returns as soon as BosonMail accepts the message. The returned status is typically "queued". Delivery to the recipient’s inbox is a separate, asynchronous step. Use getEmailStatus to poll or audit the outcome later.
Content types
You can send plain text, HTML, or both. Providing both improves compatibility across email clients. The SDK validates that at least one oftext or html is present before making a request.
Recipients
The SDK supportsto, cc, and bcc fields. Each accepts a single email address or an array of addresses. The SDK joins arrays into comma-separated strings before sending them to the API.
Attachments
Files are sent asmultipart/form-data. The SDK validates per-file size (10 MB max), total size (20 MB max), and file count (10 max) on the client side before uploading.
What the SDK does not do
The SDK is intentionally minimal. It does not provide:- Automatic retries or backoff
- Polling loops for status updates
- Webhooks for delivery events
- Email templates or templating engines
- A
fromorreply-toparameter (the sender address is determined by the API key’s associated inbox or account) - Batch or bulk send endpoints
- Scheduling or delayed sends
- Idempotency keys