You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add custom return path flag and CID/URL attachment syntax
- domains create: new --custom-return-path <subdomain> flag (same as
domains claim create)
- emails send --attachment: optional ;cid=, ;type=, ;filename= params
on paths, plus https:// URLs passed as hosted attachments
- emails send --attachments-file: JSON array escape hatch (file or
stdin) accepting snake_case and camelCase fields
- dry-run now summarizes contentId/contentType/path (content stays
redacted as byteLength)
- document URL attachment caveats (async fetch failure, no derived
filename/type) in help text and agent skill
Copy file name to clipboardExpand all lines: skills/resend-cli/SKILL.md
+7-1Lines changed: 7 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ metadata:
13
13
author: resend
14
14
# Skill version is independent from the CLI/package.json version —
15
15
# bump it on skill content changes, not CLI releases.
16
-
version: "2.5.0"
16
+
version: "2.6.0"
17
17
homepage: https://resend.com/docs/cli-agents
18
18
source: https://github.com/resend/resend-cli
19
19
openclaw:
@@ -175,6 +175,7 @@ Read the matching reference file for detailed flags and output shapes.
175
175
| 7 |**Passing `--events` to `webhooks update` expecting additive behavior**|`--events` replaces the entire subscription list — always pass the complete set |
176
176
| 8 |**Expecting `logs list` to include request/response bodies**| List returns summary fields only — use `logs get <id>` for full `request_body` and `response_body`|
177
177
| 9 |**CSV import fails with `create_error` ("missing required email column")**|`contacts imports create` matches columns case-sensitively by lowercase names (`email`, `first_name`, `last_name`) — use `--column-map` for headers like `Email`/`First Name`|
178
+
| 10 |**URL attachment "succeeds" but the email never arrives**| The API fetches `--attachment "https://..."` URLs after returning the email ID — an unreachable URL fails the email asynchronously. Verify with `emails get <id>` (`last_event: "failed"`), and always pass `;filename=` and `;type=` since neither is derived from the URL (defaults: `attachment-0`, `application/octet-stream`) |
178
179
179
180
## Common Patterns
180
181
@@ -183,6 +184,11 @@ Read the matching reference file for detailed flags and output shapes.
Copy file name to clipboardExpand all lines: skills/resend-cli/references/emails.md
+17-1Lines changed: 17 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,11 +24,27 @@ Send an email via the Resend API.
24
24
|`--bcc <addresses...>`| string[]| No | BCC recipients |
25
25
|`--reply-to <address>`| string | No | Reply-to address |
26
26
|`--scheduled-at <datetime>`| string | No | Schedule for later — ISO 8601 or natural language (e.g. `"in 1 hour"`, `"tomorrow at 9am ET"`) |
27
-
|`--attachment <paths...>`| string[]| No | File paths to attach (not compatible with `--template`) |
27
+
|`--attachment <specs...>`| string[]| No | File path or `https://` URL to attach, with optional `;cid=`, `;type=`, `;filename=` params (not compatible with `--template`) |
28
+
|`--attachments-file <path>`| string | No | Path to a JSON array of attachment objects (`"-"` for stdin; not compatible with `--template`) |
28
29
|`--headers <key=value...>`| string[]| No | Custom headers |
29
30
|`--tags <name=value...>`| string[]| No | Email tags |
30
31
|`--idempotency-key <key>`| string | No | Deduplicate request |
31
32
33
+
**Attachment syntax:** append `;cid=<id>` (inline content-id referenced as `cid:` in HTML), `;type=<mime>`, and/or `;filename=<name>` to the path or URL. ALWAYS double-quote values containing `;` — single quotes break on Windows cmd, and unquoted `;` breaks on every shell:
For paths containing a literal `;key=` or for scripted use, pass `--attachments-file` with a JSON array of objects with `content` (base64) or `path` (URL), plus optional `filename`, `content_type`, `content_id` (camelCase also accepted).
41
+
42
+
**URL attachment caveats:** the API fetches the URL *after* the send request returns an email ID — an unreachable URL fails the email asynchronously (`last_event: "failed"` on `emails get <id>`). Filename and MIME type are NOT derived from the URL (stored as `attachment-0` / `application/octet-stream`), so pass `;filename=` and `;type=` with every URL attachment:
@@ -61,7 +71,14 @@ export const sendCommand = new Command('send')
61
71
'--scheduled-at <datetime>',
62
72
'Schedule email for later — ISO 8601 or natural language e.g. "in 1 hour", "tomorrow at 9am ET"',
63
73
)
64
-
.option('--attachment <paths...>','File path(s) to attach')
74
+
.option(
75
+
'--attachment <specs...>',
76
+
'File path or URL to attach, with optional ;cid= ;type= ;filename= params (quote the value)',
77
+
)
78
+
.option(
79
+
'--attachments-file <path>',
80
+
'Path to a JSON array of attachment objects (use "-" for stdin)',
81
+
)
65
82
.option(
66
83
'--headers <key=value...>',
67
84
'Custom headers as key=value pairs (e.g. X-Entity-Ref-ID=123)',
@@ -87,7 +104,7 @@ export const sendCommand = new Command('send')
87
104
'after',
88
105
buildHelpText({
89
106
context:
90
-
'Required: --to and either --template, --react-email, or (--from, --subject, and one of --text | --text-file | --html | --html-file).\nUse --dry-run to print the request JSON without sending (attachments show filename and byteLength only).',
107
+
'Required: --to and either --template, --react-email, or (--from, --subject, and one of --text | --text-file | --html | --html-file).\nAttachments: --attachment takes a local path or https:// URL plus optional ;cid= (inline content-id), ;type= (MIME type), ;filename= params. Always double-quote values containing ";" — required on every shell (bash, PowerShell, cmd). For paths containing ";key=" or scripted use, pass a JSON array via --attachments-file.\nURL attachments are fetched by the API after send: an unreachable URL fails the email (check `emails get <id>`), and filename/MIME type are not derived from the URL — pass ;filename= and ;type=.\nUse --dry-run to print the request JSON without sending (attachment content shows byteLength only).',
91
108
output: ' {"id":"<email-id>"}',
92
109
errorCodes: [
93
110
'auth_error',
@@ -98,6 +115,7 @@ export const sendCommand = new Command('send')
98
115
'invalid_header',
99
116
'invalid_tag',
100
117
'invalid_var',
118
+
'invalid_attachment',
101
119
'template_body_conflict',
102
120
'template_attachment_conflict',
103
121
'react_email_build_error',
@@ -108,18 +126,22 @@ export const sendCommand = new Command('send')
0 commit comments