Send Email
horizon_send_emailQueues a transactional email from a dashboard template to one registered player, sent now or scheduled through your own SMTP server for game-triggered messages.
Instructions
Queues a transactional email from a dashboard template to one registered player, sent now or at a scheduled time through the developer's own SMTP server. Use when: the game triggers a message to a player, such as a welcome mail or a reminder. Not for: checking delivery (use horizon_get_email_status) or stopping a queued email (use horizon_cancel_email). Requires: an SMTP configuration and the template in the horizOn dashboard, and a recipient with a verified email address. Side effects: queues one new email per call; repeating the call sends the email again, so never repeat it to retry a status check. Returns: {id, status: 'pending', scheduledAt}; pass id to horizon_get_email_status to follow delivery or to horizon_cancel_email to stop it. Errors: 400 for an unknown templateSlug or a recipient without a verified email address: check the slug in the dashboard or pick another user. Needs HORIZON_API_KEY. Every failure returns an error result (isError) with the HTTP status and body: a 401 that horizon_test_connection also returns means HORIZON_API_KEY is wrong, 429 means the account's per-minute rate limit was reached (wait a minute, then retry).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| userId | Yes | Player user ID (UUID) of the recipient; the player needs a verified email address | |
| language | Yes | ISO 639-1 code (2 lowercase letters) of the template translation to render, for example 'en' or 'de' | |
| variables | Yes | Values for the template's variables as a string map, for example {"username": "John"}; pass {} when the template has none | |
| scheduledAt | No | ISO 8601 timestamp for delayed delivery, at most 30 days ahead, for example 2026-10-01T09:00:00Z. Omit to send immediately | |
| templateSlug | Yes | Slug of an email template defined in the dashboard, for example 'welcome' or 'reminder' |