> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bosonware.com/llms.txt
> Use this file to discover all available pages before exploring further.

# BosonMail SDK documentation

> Official Node.js and TypeScript SDK for sending transactional email through BosonMail by BosonWare Enterprises.

The BosonMail SDK is the official Node.js and TypeScript client for sending transactional email through [BosonMail](https://bosonware.com/products/bosonmail), the managed business email platform by BosonWare Enterprises (Kenya). It is a thin, typed HTTP wrapper around the BosonMail REST API with zero runtime dependencies.

Install the package and send your first email in minutes.

```bash npm theme={null}
npm install @bosonware-ent/bosonmail
```

```typescript send.ts theme={null}
import BosonMailClient from "@bosonware-ent/bosonmail";

const client = new BosonMailClient({
  apiKey: process.env.BOSONMAIL_API_KEY!,
});

const result = await client.sendEmail(
  "customer@example.com",
  "Welcome to BosonMail",
  {
    text: "Thanks for signing up. Your account is ready.",
  }
);

console.log(result.success ? `Queued: ${result.messageId}` : `Failed: ${result.errorMessage}`);
```

> [!NOTE]
>
> A successful `sendEmail` response means BosonMail accepted the message for processing. It does not mean the message has been delivered to the recipient's inbox. Use [`getEmailStatus`](https://docs.bosonware.com/sdk/email-status) to track delivery.

## What the SDK does

* Send plain-text and HTML transactional emails
* Address multiple recipients, CC, and BCC
* Attach files up to 10 MB each (20 MB total)
* Look up email submission and delivery status by message ID
* Return fully typed results with status codes, IDs, and error messages
* Time out requests cleanly after a configurable duration

## Explore the docs

> [card] [Quickstart](https://docs.bosonware.com/quickstart.md)
>
> Go from zero to a sent email in under five minutes.

> [card] [Installation](https://docs.bosonware.com/installation.md)
>
> Package managers, requirements, and TypeScript setup.

> [card] [Authentication](https://docs.bosonware.com/authentication.md)
>
> API keys, Bearer tokens, and security basics.

> [card] [Sending emails](https://docs.bosonware.com/sdk/sending-emails.md)
>
> Recipients, subjects, text, HTML, and result handling.

> [card] [Attachments](https://docs.bosonware.com/sdk/attachments.md)
>
> File uploads, size limits, and content types.

> [card] [Email status](https://docs.bosonware.com/sdk/email-status.md)
>
> Track submission and delivery with message IDs.

> [card] [Next.js guide](https://docs.bosonware.com/guides/nextjs.md)
>
> Send email from API routes and server actions.

> [card] [API reference](https://docs.bosonware.com/advanced/api-reference.md)
>
> Endpoints, request formats, and response envelopes.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.