Use this page when you want working code instead of a high-level feature page.

The main example library lives at [github.com/mailslurp/examples](https://github.com/mailslurp/examples), and it is the fastest way to see how MailSlurp is used in real workflows across JavaScript, Java, C#, PHP, Python, Go, and more.

## Start with the workflow you want to prove

### Messaging examples

Use these examples when the job is to create inboxes, send or receive email, or connect inbound events to your application:

- [Send and receive email](/guides/send-and-receive-email/)
- [Receiving emails with APIs](/guides/receiving-email/)
- [Email webhooks](/guides/email-webhooks/)
- [Custom domains](/guides/custom-domains/)

### Testing examples

Use these when you need CI-friendly examples for auth, OTP, and message assertions:

- [Email testing](/guides/email-testing/)
- [Test 2FA, OTP, and SMS codes](/guides/testing-2fa-otp-sms-codes/)
- [Playwright OTP testing](/guides/test-sms-otp-mfa-using-playwright/)
- [Cypress email testing](/guides/testing/cypress-js/)

### Extract and automation examples

Use these when inbound messages or attachments need to become structured payloads:

- [Extract email content](/guides/extract-email-content/)
- [Email attachments API](/guides/email-attachments-api/)
- [Wait for emails API](/guides/wait-for-emails-api/)
- [Testing webhooks](/guides/testing-webhooks/)

## Core developer resources

- [Documentation](/docs/)
- [REST API reference](/docs/api/)
- [SDK libraries](/docs/sdks/)
- [Developer quickstart](/guides/developers/)

## Minimal JavaScript example

```bash
npm install --save mailslurp-client
```

```typescript
import { MailSlurp } from "mailslurp-client";

const mailslurp = new MailSlurp({
  apiKey: process.env.MAILSLURP_API_KEY,
});

const inbox = await mailslurp.createInbox();
console.log(inbox.emailAddress);
```

If you want a runnable project instead of a snippet, use the GitHub examples repo first and then move into the workflow-specific guides above.
