resend-cli 2.10.0 → 2.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "resend-cli",
3
- "version": "2.10.0",
3
+ "version": "2.11.0",
4
4
  "description": "The official CLI for Resend",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -46,7 +46,7 @@
46
46
  "esbuild": "0.28.1",
47
47
  "esbuild-wasm": "0.28.0",
48
48
  "picocolors": "1.1.1",
49
- "resend": "6.18.0"
49
+ "resend": "6.18.1"
50
50
  },
51
51
  "pkg": {
52
52
  "scripts": [
@@ -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.
183
184
  resend emails send --from "you@domain.com" --to user@example.com --subject "Hello" --text "Body"
184
185
  ```
185
186
 
187
+ **Send an inline image (CID attachment) — always double-quote `;` params (required on bash, PowerShell, and cmd):**
188
+ ```bash
189
+ resend emails send --from "you@domain.com" --to user@example.com --subject "Hello" --html "<img src=cid:logo>" --attachment "./logo.png;cid=logo"
190
+ ```
191
+
186
192
  **Send a React Email template (.tsx):**
187
193
  ```bash
188
194
  resend emails send --from "you@domain.com" --to user@example.com --subject "Welcome" --react-email ./emails/welcome.tsx
@@ -28,6 +28,7 @@ Create a new domain and receive DNS records to configure.
28
28
  | `--region <region>` | string | No | `us-east-1` \| `eu-west-1` \| `sa-east-1` \| `ap-northeast-1` |
29
29
  | `--tls <mode>` | string | No | `opportunistic` (default) \| `enforced` |
30
30
  | `--tracking-subdomain <subdomain>` | string | No | Subdomain for click and open tracking (e.g., `track`) |
31
+ | `--custom-return-path <subdomain>` | string | No | Subdomain for the Return-Path address (e.g., `bounce`) |
31
32
  | `--sending` | boolean | No | Enable sending (default: enabled) |
32
33
  | `--receiving` | boolean | No | Enable receiving (default: disabled) |
33
34
 
@@ -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:
34
+
35
+ ```bash
36
+ resend emails send ... --html "<img src=cid:logo>" --attachment "./logo.png;cid=logo"
37
+ resend emails send ... --attachment "https://example.com/report.pdf;type=application/pdf"
38
+ ```
39
+
40
+ 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:
43
+
44
+ ```bash
45
+ resend emails send ... --attachment "https://example.com/report.pdf;filename=report.pdf;type=application/pdf"
46
+ ```
47
+
32
48
  **Output:** `{"id":"<uuid>"}`
33
49
 
34
50
  ---
@@ -49,7 +65,7 @@ Retrieve a sent email by ID.
49
65
  "to": ["user@example.com"],
50
66
  "subject": "Hello",
51
67
  "last_event": "delivered",
52
- "created_at": "<iso-date>",
68
+ "created_at": "<date>",
53
69
  "scheduled_at": null
54
70
  }
55
71
  ```