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

Configuration flags

Every flag of sendmock serve, with its environment variable, sendmock.toml key and default.

Generated from SendMock's code, so it always matches the binary.

Each setting can come from a flag, a SENDMOCK_* environment variable or a key in sendmock.toml. A flag wins over the variable, and both win over the file; an unknown key or an invalid value stops SendMock at startup with a message. See Configuration and seed file for how they fit together.

FlagEnvironment variablesendmock.toml keyDefaultWhat it does
--config <FILE>SENDMOCK_CONFIG./sendmock.toml, then sendmock/sendmock.toml in the OS config folderConfiguration file.
--http-addr <HOST:PORT>SENDMOCK_HTTP_ADDRhttp_addr127.0.0.1:8025Address for the web UI, REST API and MCP.
--smtp-addr <HOST:PORT>SENDMOCK_SMTP_ADDRsmtp_addr127.0.0.1:1025Address for the SMTP listener.
--smtps-addr <HOST:PORT>SENDMOCK_SMTPS_ADDRsmtps_addrAddress for the SMTPS listener (TLS from the first byte); off unless set.
--provider-addr <HOST:PORT>SENDMOCK_PROVIDER_ADDRprovider_addrAddress that serves the provider APIs at their real paths, for SDKs with a swapped base URL; off unless set.
--catcher-addr <HOST:PORT>SENDMOCK_CATCHER_ADDRcatcher_addrAddress that captures every request at any path in the HTTP catcher, the first path segment naming the bin; off unless set.
--pop3-addr <HOST:PORT>SENDMOCK_POP3_ADDRpop3_addrAddress for the POP3 listener, which serves the captured mail per project; off unless set.
--pop3-auth <MODE>SENDMOCK_POP3_AUTHpop3_authaccept-anyPOP3 login: accept-any or file:<path> with user:password lines; the username picks the project.
--provider-port <PROVIDER=PORT>SENDMOCK_PROVIDER_PORTSprovider_portsGive one provider its own port, as provider=port (repeat or separate with commas), for providers that share a path.
--smtp-max-size <SIZE>SENDMOCK_SMTP_MAX_SIZEsmtp_max_size25MBLargest message SMTP accepts; larger ones get 552.
--smtp-auth <MODE>SENDMOCK_SMTP_AUTHsmtp_authaccept-anySMTP AUTH: accept-any, none (not offered) or file:<path> with user:password lines.
--smtp-tls-cert <FILE>SENDMOCK_SMTP_TLS_CERTsmtp_tls_certa self-signed one generated on first runCertificate (PEM) for STARTTLS and SMTPS.
--smtp-tls-key <FILE>SENDMOCK_SMTP_TLS_KEYsmtp_tls_keyPrivate key (PEM) for --smtp-tls-cert.
--smtp-starttlsSENDMOCK_SMTP_STARTTLSsmtp_starttlsOffer STARTTLS on the SMTP port, with a self-signed certificate generated on first run unless --smtp-tls-cert is set.
--smtp-require-tlsSENDMOCK_SMTP_REQUIRE_TLSsmtp_require_tlsRefuse MAIL with 530 until the client has run STARTTLS (turns STARTTLS on).
--smtp-allow-rcpt <GLOBS>SENDMOCK_SMTP_ALLOW_RCPTsmtp_allow_rcpt*Recipients SMTP accepts, as comma-separated globs; others get 550.
--max-emails <COUNT>SENDMOCK_MAX_EMAILSmax_emails1000The most emails kept; older ones (and older SMTP and API log entries) are pruned; 0 keeps every email.
--max-sms <COUNT>SENDMOCK_MAX_SMSmax_sms1000The most SMS kept (with verifications and push notifications); older ones are pruned; 0 keeps every SMS.
--max-age <DAYS>SENDMOCK_MAX_AGEmax_agekeep until the count limitPrune traffic older than this, such as 7d.
--update-check <MODE>SENDMOCK_UPDATE_CHECKupdate_checkoffWhen to look for a newer release: off, manual or daily.
--relay-smtp <URL>SENDMOCK_RELAY_SMTPrelay_smtpoffA real SMTP server that Release and auto-forward rules send through, such as smtp://user:[email protected]:587.
--relay-allowlist <GLOBS>SENDMOCK_RELAY_ALLOWLISTrelay_allowlistnoneRecipients Release and auto-forward may send to, as comma-separated globs such as *@yourcompany.com; nothing leaves without one.
--spamassassin <HOST:PORT>SENDMOCK_SPAMASSASSINspamassassinoffA running SpamAssassin spamd to score emails in the Checks tab.
--ready-jsonSENDMOCK_READY_JSONPrint one JSON line with the bound addresses on stdout once listening (logs go to stderr); port 0 picks a free port.
--demoSENDMOCK_DEMOFill an empty instance with the website demo's sample data (emails, SMS, webhooks, catcher bins, payments).
--ui-auth <USER:PASSWORD|file:PATH>SENDMOCK_UI_AUTHui_authProtect the UI, API, realtime streams and MCP over HTTP: user:password, or file:<path> with user:password lines.
--api-token <TOKEN>SENDMOCK_API_TOKENapi_tokenWith --ui-auth, also accept Authorization: Bearer <token> (for the CLI, scripts and the docs playground).
--templates-dir <DIRECTORY>SENDMOCK_TEMPLATES_DIRA directory of webhook template files (TOML, as exported), loaded at startup and reloaded when a file changes; they are read-only in SendMock.
--cors-origins <ORIGINS>SENDMOCK_CORS_ORIGINScors_originshttps://shibbirweb.github.ioBrowser origins allowed to call the API, comma-separated; empty turns CORS off.
--db <PATH|memory>SENDMOCK_DBdbsendmock.db in the OS data folderDatabase file, or memory to keep nothing after exit.
--log-format <LOG_FORMAT>SENDMOCK_LOG_FORMATlog_formathumanLog output: readable lines, or one JSON object per line for log collectors.
--log-level <LOG_LEVEL>SENDMOCK_LOG_LEVELlog_levelinfoLowest log level shown.
--seed <FILE>SENDMOCK_SEEDseed./sendmock.seed.toml when presentSeed file with the configuration to start from.