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

# Nodejs

# Node.js Quickstart

Send your first email with the Mailofly TypeScript SDK.

**Requires:** Node.js 18+ · [API key](api-keys.md) · [Account key](sending-accounts.md)

***

## 1. Install

```bash theme={null}
npm install mailofly
```

***

## 2. Send an email

```ts theme={null}
import { Mailofly } from "mailofly";

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

const { id } = await client.emails.send({
  from: "Acme <onboarding@example.com>",
  to: ["you@example.com"],
  subject: "Hello from Mailofly",
  html: "<p>It works!</p>",
  account_key: process.env.MAILOFLY_ACCOUNT_KEY,
});

console.log("Sent:", id);
```

***

## 3. Check mail logs

Open **[Emails](https://www.mailofly.com/user/emails)** or call:

```ts theme={null}
await client.mailLogs.list({ page: 1, page_size: 10 });
```

***

## Next

* [TypeScript SDK](../sdks/typescript.md) — full reference
* [Sending examples](sending-examples.md)
* [API: Emails](https://docs.mailofly.com/api/emails)


## Related topics

- [Introduction](/api/index.md)
- [Verify signatures](/webhooks/verify-signatures.md)
- [Email types](/getting-started/email-types.md)
- [Add domain](/getting-started/add-domain.md)
