Preview: SendMock has no stable release yet. These docs follow develop.

CLI reference

System commands

sendmock health

Liveness check; answers while the server runs.

sendmock health

Example

sendmock health

Output with --json: HealthStatus. Exit codes: 0, 1, 2.

API
GET/api/v1/health
MCP tool
sendmock_status
In the app
Sidebar > live connection dot

sendmock reset

Delete all traffic and restore the seed configuration.

sendmock reset --yes
FlagTypeDescription
--yesboolean
Confirms a destructive command; without it the command stops.

Example

sendmock reset --yes

Output with --json: nothing. Exit codes: 0, 1, 2.

API
POST/api/v1/reset
MCP tool
sendmock_reset
In the app
Settings > General > Reset to seed

sendmock sample

Create a sample email, SMS, verification or HTTP request through the normal path.

sendmock sample <kind> [flags]

Also runs as sendmock email send-test.

ArgumentTypeDescription
<kind>requiredstring
What to create: email, sms, verification or http.Example: email
FlagTypeDescription
--to <to>string
The recipient of the sample email.Example: [email protected]
--subject <subject>string
The subject of the sample email.Example: Hello from SendMock
--html <html>string
The HTML body of the sample email.Example: <p>It works!</p>
--webhook <webhook>string[] (repeat for more)
Send this action's webhooks to exactly these endpoints (IDs from GET /api/v1/webhooks/endpoints) instead of the ones the rules pick; an empty list sends none. Leave it out to let the rules decide.Example: ["01JB7T9Q2RENDPOINT00000000"]
--webhook-requests <webhook-requests>WebhookRequestEdit[] (JSON)
Payloads edited for this action, by endpoint: each body is sent as written instead of the rendered one and signed over those bytes. Leave it out to send the rendered payloads.Example: [{"endpoint_id":"01JB7T9Q2RENDPOINT00000000","event_type":"email.bounced","body":"{\"type\":\"email.bounced\",\"data\":{\"reason\":\"edited\"}}","headers":{"x-tenant":"acme"}}]

Example

sendmock sample email --to [email protected] --subject 'Hello from SendMock'

Output with --json: CreatedSample. Exit codes: 0, 1, 2, 3.

API
POST/api/v1/samples/{kind}
MCP tool
sendmock_sample_send
In the app
Empty screens > Send a sample email, SMS, verification or request

sendmock settings set

Change settings; send only the changed keys.

sendmock settings set [flags]

Also runs as sendmock chaos smtp-reject, sendmock chaos smtp-latency, sendmock chaos sms-failure-rate, sendmock chaos clear.

FlagTypeDescription
--max-emails <max-emails>number
The most emails kept; the oldest are deleted past it. 0 keeps every email (no limit).Example: 1000
--max-sms <max-sms>number
The most SMS kept (with verifications and push notifications); the oldest are deleted past it. 0 keeps every SMS (no limit).Example: 1000
--max-age-days <max-age-days>number
Null keeps traffic until the count limits prune it.Example: 7
--plus-address-tagging-enabledboolean
Tags [email protected] with invoice. --no-plus-address-tagging-enabled sets it to false.
--email-outcome-profile <email-outcome-profile>string
off sends no delivery events, auto-delivered marks every email delivered after a short delay, realistic adds bounces and complaints at the rates below.One of: off, auto-delivered, realisticExample: off
--email-outcome-bounce-rate-percent <email-outcome-bounce-rate-percent>number
Used by the realistic outcome profile.Example: 5
--email-outcome-complaint-rate-percent <email-outcome-complaint-rate-percent>number
Complaints in the realistic outcome profile, 0 to 100.Example: 1
--relay-smtp-url <relay-smtp-url>string
Relay for release and auto-forward; the password is always masked.Example: smtp://user:[email protected]:587
--relay-recipient-allowlist <relay-recipient-allowlist>string[] (repeat for more)
Glob patterns; release stays off while this is empty.Example: ["*@yourcompany.com"]
--spamassassin-address <spamassassin-address>string
host:port of a SpamAssassin spamd; null turns the spam check off.Example: 127.0.0.1:783
--sms-simulation-profile <sms-simulation-profile>string
instant delivers at once, realistic goes queued, sent, then delivered over a few seconds, manual stays sent until you pick a status.One of: instant, realistic, manualExample: instant
--sms-failure-rate-percent <sms-failure-rate-percent>number
The share of SMS that fail at random, 0 to 100.Example: 0
--strict-twilio-test-modeboolean
Rejects numbers that are not Twilio test numbers with error 21606, like real test credentials. --no-strict-twilio-test-mode sets it to false.
--magic-numbers-enabledboolean
Off: the built-in Twilio and SendMock numbers behave like any number. --no-magic-numbers-enabled sets it to false.
--magic-addresses-enabledboolean
Off: the built-in magic addresses behave like any address. --no-magic-addresses-enabled sets it to false.
--fire-opened-events-on-viewboolean
Fires email.opened and sms.opened when you open a message in the UI. --no-fire-opened-events-on-view sets it to false.
--opened-event-mode <opened-event-mode>string
first_open fires on the first view only, every_open on each view.One of: first_open, every_openExample: first_open
--chaos-smtp-reject-next-count <chaos-smtp-reject-next-count>number
Rejects the next N SMTP messages, to test your app's retries.Example: 0
--chaos-smtp-reject-code <chaos-smtp-reject-code>number
The SMTP code used for rejected messages: 421, 450, 550 or 552.One of: 421, 450, 550, 552Example: 450
--chaos-smtp-reject-recipient-pattern <chaos-smtp-reject-recipient-pattern>string
Glob; matching recipients get 550 No such user.Example: *@unknown.test
--chaos-smtp-command-latency-ms <chaos-smtp-command-latency-ms>number
Delay added to every SMTP command, in milliseconds.Example: 0
--chaos-smtp-drop-during-data-enabledboolean
Drops the connection during DATA, to test half-sent messages. --no-chaos-smtp-drop-during-data-enabled sets it to false.
--otp-pattern <otp-pattern>string[] (repeat for more)
Ordered; the first capture group of the first match is the code.Example: ["code[:\\s]+(\\d{4,8})"]
--update-check-mode <update-check-mode>string
When SendMock looks for a newer release: off never calls out, manual only on request, daily on start and once a day.One of: off, manual, dailyExample: off
--inbound-email-domain <inbound-email-domain>string[] (repeat for more)
Mail for these domains is incoming; offered as Forward suggestions.Example: ["reply.app.test"]
--payment-merchant-name <payment-merchant-name>string
Shown on checkout pages and as {merchant} in step labels.Example: Demo Shop
--payment-default-currency <payment-default-currency>string
For hosted checkouts created without a currency.Example: USD
--payment-outcome-profile <payment-outcome-profile>string
What a new hosted checkout does: interactive waits for the page, auto_success and auto_decline settle at once, random succeeds at the rate below.One of: interactive, auto_success, auto_decline, randomExample: interactive
--payment-random-success-rate-percent <payment-random-success-rate-percent>number
Used by the random outcome profile.Example: 80
--verify-default-code-length <verify-default-code-length>number
Digits in each code of a Verify service made without its own code length, 4 to 10.Example: 6
--verify-default-ttl-seconds <verify-default-ttl-seconds>number
How long a code stays valid, in seconds, for a Verify service made without its own TTL.Example: 600
--verify-fixed-code <verify-fixed-code>string
Sent by every Verify service without its own fixed code; null for random codes.Example: 123456

Example

sendmock settings set --max-emails 1000 --max-sms 1000

Output with --json: AppSettings. Exit codes: 0, 1, 2.

API
PATCH/api/v1/settings
MCP tool
sendmock_settings_update
In the app
Settings > Save changes

sendmock status

Version, listen addresses and enabled features.

sendmock status

Also runs as sendmock version.

Example

sendmock status

Output with --json: AppInfo. Exit codes: 0, 1, 2.

API
GET/api/v1/info
MCP tool
sendmock_status
In the app
Settings > About

sendmock update check

Whether a newer release exists for this channel, with its notes and upgrade command.

sendmock update check

Example

sendmock update check

Output with --json: UpdateCheckResult. Exit codes: 0, 1, 2.

API
GET/api/v1/updates
MCP tool
sendmock_update_check
In the app
Settings > About > Check GitHub Releases for updates