jetemail email wraps the transactional send endpoints. Two subcommands:
| Subcommand | Endpoint | Description |
|---|---|---|
email send | POST /email | Send a single message |
email batch | POST /email-batch | Send up to N messages in one request |
jetemail send … is a shorthand alias for jetemail email send ….
Authentication uses your transactional key (transactional_…). Set it with jetemail login, JETEMAIL_TRANSACTIONAL_KEY, or --transactional-key.
email send
--from, --to, or --subject aren’t supplied in an interactive shell, you’ll be prompted for the missing values. The body (--html / --text) is required for an actual send.
Flags
| Flag | Description |
|---|---|
--from <addr> | Sender address (e.g. name@yourdomain.com). |
--to <addr> | Recipient address. Repeat for multiple. |
--subject <str> | Subject line. |
--html <src> | HTML body. Literal string, @file, or - for stdin. |
--text <src> | Plain-text body. Literal string, @file, or -. |
--cc <addr> | CC address. Repeatable. |
--bcc <addr> | BCC address. Repeatable. |
--reply-to <addr> | Reply-To address. |
--header 'Name: Value' | Custom header. Repeatable. |
--attach <spec> | Attachment. @path/to/file (auto-base64) or a JSON object literal. Repeatable. |
--eu | Route through the EU region. |
--scheduled-at <iso8601> | Schedule the send. See Scheduled email. |
--idempotency-key <key> | Idempotency-Key header. Same key replays the original response. See Idempotency. |
--body-json <src> | Whole body. Merged underneath typed flags. See Body & field escape hatches. |
--field key=value | Override a single top-level field. Repeatable. |
Body sources
--html, --text, and --body-json all accept the same three sources:
| Source | Meaning |
|---|---|
| Literal | --html "<p>Hi</p>" |
@path | Read from a file: --html @welcome.html |
- | Read from stdin: cat welcome.html | jetemail send … --html - |
Attachments
Examples
Plain text:email batch
Send many messages in one request. Pass a JSON document containing either the full batch payload or just the array of email objects.
batch.json can be:
Flags
| Flag | Description |
|---|---|
--body-json <src> | Required. JSON payload (@file, -, or literal). |
--idempotency-key <key> | Replay the response if the same key is used again. |