KosmoKrator

productivity

Mailtrap CLI for Cron Jobs

Use the Mailtrap CLI for cron jobs with headless JSON commands, schema discovery, credentials, and permission controls.

7 functions 6 read 1 write API token auth

Mailtrap CLI for Cron Jobs

Schedule repeatable integration workflows from cron while keeping credentials in KosmoKrator config.

Use the headless CLI from cron when an operation should run without an interactive agent session. The Mailtrap CLI uses the same integration registry as the TUI, Lua runtime, and MCP gateway, but returns predictable command output for automation.

Command Shape

# Mailtrap CLI for Cron Jobs
kosmokrator integrations:configure mailtrap --set api_token="$MAILTRAP_API_TOKEN" --enable --read allow --write ask --json
kosmo integrations:call mailtrap.mailtrap_list_inboxes '{}' --json

Discovery Before Execution

Agents and scripts can inspect Mailtrap docs and schemas before choosing a function.

kosmo integrations:docs mailtrap --json
kosmo integrations:docs mailtrap.mailtrap_list_inboxes --json
kosmo integrations:schema mailtrap.mailtrap_list_inboxes --json
kosmo integrations:search "Mailtrap" --json
kosmo integrations:list --json

Useful Mailtrap CLI Functions

FunctionTypeParametersDescription
mailtrap.mailtrap_list_inboxes Read none List all inboxes in the Mailtrap account. Returns inbox IDs, names, and email addresses.
mailtrap.mailtrap_get_inbox Read inbox_id Get details for a specific Mailtrap inbox by ID, including its email address, settings, and message counts.
mailtrap.mailtrap_list_messages Read inbox_id, page, per_page, search List messages in a Mailtrap inbox with optional search and pagination.
mailtrap.mailtrap_get_message Read inbox_id, message_id Get a single message from a Mailtrap inbox by its ID, including subject, sender, recipient, and body.
mailtrap.mailtrap_send_test_email Write from, to, subject, text, html, inbox_id Send a test email through Mailtrap. Provide sender, recipient(s), subject, and either text or HTML body.
mailtrap.mailtrap_list_suppressions Read inbox_id, page, per_page List suppressions (blocked recipients) for a Mailtrap inbox.
mailtrap.mailtrap_get_current_user Read none Get the current Mailtrap user profile and account info. Useful as a health check.

Automation Notes

Related Mailtrap CLI Pages