Getting Started· 5 minute read

Quick Start

Get InboxLens running in your test suite in under 5 minutes. No SMTP credentials to manage — just point the SDK at your workspace and start asserting on real emails.

1

Create your workspace

Sign up at /signup to create your account. During onboarding you will be prompted to choose a workspace slug — this becomes the subdomain for your test inboxes (e.g. acme.testmail.neio.ai).

2

Create an API key

Go to Settings → API Keys in the dashboard. Click New API Key, give it a name (e.g. ci-tests), and copy the key immediately — it is only shown once.

Keys are prefixed with il_live_ for live environments.

3

Install the SDK

Add the InboxLens SDK to your project:

bash
npm install @inboxlens/sdk
4

Generate a test address

Any address at your workspace subdomain is valid — no registration needed. Use a tag or random prefix to keep tests isolated:

user+abc123@acme.testmail.neio.ai

The part before the @ can be anything. Tags after + are ignored for routing but preserved in the To header.

5

Send a test email via SMTP

The InboxLens SMTP server listens on port 2525. No credentials required — any sender is accepted.

bash
# Send a test email via SMTP
swaks \
  --to user@your-workspace.testmail.neio.ai \
  --from sender@example.com \
  --server testmail.neio.ai \
  --port 2525 \
  --body "Hello from the test suite"
6

Read it back with the SDK

Use waitForLatest to long-poll until the message arrives, then assert on its contents:

typescript
const { InboxLens } = require('@inboxlens/sdk');

const inbox = new InboxLens({
  apiKey: 'il_live_your_key_here',
  baseUrl: 'https://testmail.neio.ai',
});

// Wait for the welcome email (long-poll, up to 30s)
const email = await inbox.messages.waitForLatest({
  to: 'user@your-workspace.testmail.neio.ai',
  timeout: 30,
});

expect(email.subject).toBe('Welcome to Acme!');