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.
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).
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.
Install the SDK
Add the InboxLens SDK to your project:
npm install @inboxlens/sdkGenerate a test address
Any address at your workspace subdomain is valid — no registration needed. Use a tag or random prefix to keep tests isolated:
The part before the @ can be anything. Tags after + are ignored for routing but preserved in the To header.
Send a test email via SMTP
The InboxLens SMTP server listens on port 2525. No credentials required — any sender is accepted.
# 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"Read it back with the SDK
Use waitForLatest to long-poll until the message arrives, then assert on its contents:
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!');