@cakemail-org/cakemail-cli 1.7.0 → 2.0.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/.claude/settings.local.json +12 -0
- package/.env.example +40 -0
- package/.env.test.example +45 -0
- package/CHANGELOG.md +1031 -0
- package/README.md +41 -37
- package/audit-formats.js +128 -0
- package/cakemail.rb +20 -0
- package/dist/client.js +1 -1
- package/dist/client.js.map +1 -1
- package/dist/commands/account.js +1 -1
- package/dist/commands/account.js.map +1 -1
- package/dist/commands/attributes.js +1 -1
- package/dist/commands/attributes.js.map +1 -1
- package/dist/commands/campaigns.js +1 -1
- package/dist/commands/campaigns.js.map +1 -1
- package/dist/commands/contacts.js +1 -1
- package/dist/commands/contacts.js.map +1 -1
- package/dist/commands/emails.js +1 -1
- package/dist/commands/emails.js.map +1 -1
- package/dist/commands/interests.js +1 -1
- package/dist/commands/interests.js.map +1 -1
- package/dist/commands/lists.js +1 -1
- package/dist/commands/lists.js.map +1 -1
- package/dist/commands/logs.js +1 -1
- package/dist/commands/logs.js.map +1 -1
- package/dist/commands/reports.js +1 -1
- package/dist/commands/reports.js.map +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/segments.js.map +1 -1
- package/dist/commands/senders.js +1 -1
- package/dist/commands/senders.js.map +1 -1
- package/dist/commands/suppressed.js +1 -1
- package/dist/commands/suppressed.js.map +1 -1
- package/dist/commands/tags.js +1 -1
- package/dist/commands/tags.js.map +1 -1
- package/dist/commands/templates.js +1 -1
- package/dist/commands/templates.js.map +1 -1
- package/dist/commands/transactional-templates.js +1 -1
- package/dist/commands/transactional-templates.js.map +1 -1
- package/dist/commands/webhooks.js +1 -1
- package/dist/commands/webhooks.js.map +1 -1
- package/dist/utils/config.js +2 -2
- package/dist/utils/config.js.map +1 -1
- package/dist/utils/errors.js +1 -1
- package/dist/utils/errors.js.map +1 -1
- package/dist/utils/progress.d.ts.map +1 -1
- package/dist/utils/progress.js +32 -4
- package/dist/utils/progress.js.map +1 -1
- package/dist/utils/spinner.d.ts +17 -0
- package/dist/utils/spinner.d.ts.map +1 -0
- package/dist/utils/spinner.js +43 -0
- package/dist/utils/spinner.js.map +1 -0
- package/docs/DOCUMENTATION-STANDARD.md +1068 -0
- package/docs/README.md +161 -0
- package/docs/developer/ARCHITECTURE.md +516 -0
- package/docs/developer/AUTH.md +204 -0
- package/docs/developer/CONTRIBUTING.md +227 -0
- package/docs/developer/DOCUMENTATION_SUMMARY.md +346 -0
- package/docs/developer/PROJECT_INDEX.md +365 -0
- package/docs/planning/API_COVERAGE.md +1045 -0
- package/docs/planning/BACKLOG.md +1159 -0
- package/docs/planning/PROFILE_SYSTEM_TASKS.md +287 -0
- package/docs/planning/UX_IMPLEMENTATION_PLAN.md +691 -0
- package/docs/planning/archive/RELEASE_CHECKLIST_v1.3.0.md +332 -0
- package/docs/planning/archive/RELEASE_v1.3.0.md +428 -0
- package/docs/planning/archive/cakemail-cli-ux-improvements.md +438 -0
- package/docs/planning/cakemail-profile-system-plan.md +1121 -0
- package/docs/testing/AI_USER_SIMULATION_DESIGN.md +1342 -0
- package/docs/testing/KENOGAMI_BIDIRECTIONAL_FLOW.md +1517 -0
- package/docs/testing/KENOGAMI_TRUTH_RECONCILIATION_SYSTEM.md +1369 -0
- package/docs/user-manual/.obsidian/app.json +1 -0
- package/docs/user-manual/.obsidian/appearance.json +1 -0
- package/docs/user-manual/.obsidian/core-plugins.json +33 -0
- package/docs/user-manual/.obsidian/workspace.json +167 -0
- package/docs/user-manual/01-getting-started/01-installation.md +214 -0
- package/docs/user-manual/01-getting-started/02-quick-start.md +432 -0
- package/docs/user-manual/01-getting-started/03-authentication.md +448 -0
- package/docs/user-manual/01-getting-started/04-configuration.md +430 -0
- package/docs/user-manual/01-getting-started/05-output-formats.md +447 -0
- package/docs/user-manual/02-core-concepts/01-accounts.md +514 -0
- package/docs/user-manual/02-core-concepts/02-profile-system.md +771 -0
- package/docs/user-manual/02-core-concepts/03-smart-defaults.md +485 -0
- package/docs/user-manual/02-core-concepts/04-authentication-methods.md +435 -0
- package/docs/user-manual/02-core-concepts/05-pagination-filtering.md +600 -0
- package/docs/user-manual/02-core-concepts/06-error-handling.md +718 -0
- package/docs/user-manual/02-core-concepts/07-api-coverage.md +483 -0
- package/docs/user-manual/03-email-operations/01-senders.md +490 -0
- package/docs/user-manual/03-email-operations/02-templates.md +444 -0
- package/docs/user-manual/03-email-operations/03-transactional-emails.md +706 -0
- package/docs/user-manual/03-email-operations/04-email-tracking.md +407 -0
- package/docs/user-manual/04-campaign-management/01-campaigns-basics.md +394 -0
- package/docs/user-manual/04-campaign-management/02-campaign-scheduling.md +630 -0
- package/docs/user-manual/04-campaign-management/03-campaign-testing.md +997 -0
- package/docs/user-manual/04-campaign-management/04-campaign-lifecycle.md +709 -0
- package/docs/user-manual/04-campaign-management/05-campaign-links.md +934 -0
- package/docs/user-manual/05-contact-management/01-lists.md +836 -0
- package/docs/user-manual/05-contact-management/02-contacts.md +1035 -0
- package/docs/user-manual/05-contact-management/03-custom-attributes.md +788 -0
- package/docs/user-manual/05-contact-management/04-segments.md +1028 -0
- package/docs/user-manual/05-contact-management/05-contact-import-export.md +1031 -0
- package/docs/user-manual/06-analytics-reporting/01-campaign-analytics.md +867 -0
- package/docs/user-manual/06-analytics-reporting/02-account-reports.md +227 -0
- package/docs/user-manual/07-integrations/01-webhooks-integration.md +259 -0
- package/docs/user-manual/07-integrations/02-automation.md +326 -0
- package/docs/user-manual/08-advanced-usage/01-scripting-patterns.md +672 -0
- package/docs/user-manual/08-advanced-usage/02-bulk-operations.md +932 -0
- package/docs/user-manual/08-advanced-usage/03-ci-cd-integration.md +892 -0
- package/docs/user-manual/08-advanced-usage/04-performance-optimization.md +766 -0
- package/docs/user-manual/09-command-reference/01-config.md +776 -0
- package/docs/user-manual/09-command-reference/02-account.md +652 -0
- package/docs/user-manual/09-command-reference/03-lists.md +958 -0
- package/docs/user-manual/09-command-reference/04-contacts.md +1408 -0
- package/docs/user-manual/09-command-reference/05-attributes.md +617 -0
- package/docs/user-manual/09-command-reference/06-segments.md +894 -0
- package/docs/user-manual/09-command-reference/07-senders.md +803 -0
- package/docs/user-manual/09-command-reference/08-templates.md +818 -0
- package/docs/user-manual/09-command-reference/09-campaigns.md +1250 -0
- package/docs/user-manual/09-command-reference/10-emails.md +807 -0
- package/docs/user-manual/09-command-reference/11-reports.md +1135 -0
- package/docs/user-manual/09-command-reference/12-webhooks.md +773 -0
- package/docs/user-manual/09-command-reference/13-suppressed.md +797 -0
- package/docs/user-manual/09-command-reference/14-interests.md +630 -0
- package/docs/user-manual/09-command-reference/15-tags.md +584 -0
- package/docs/user-manual/09-command-reference/16-logs.md +656 -0
- package/docs/user-manual/09-command-reference/17-transactional-templates.md +850 -0
- package/docs/user-manual/10-troubleshooting/01-common-errors.md +457 -0
- package/docs/user-manual/10-troubleshooting/02-authentication-issues.md +558 -0
- package/docs/user-manual/10-troubleshooting/03-connection-problems.md +634 -0
- package/docs/user-manual/10-troubleshooting/04-debugging.md +725 -0
- package/docs/user-manual/11-appendix/04-faq.md +484 -0
- package/docs/user-manual/11-appendix/05-glossary.md +250 -0
- package/docs/user-manual/README.md +0 -0
- package/package.json +13 -61
- package/src/cli.ts +125 -0
- package/src/client.ts +16 -0
- package/src/commands/account.ts +267 -0
- package/src/commands/accounts.ts +78 -0
- package/src/commands/actions.ts +249 -0
- package/src/commands/attributes.ts +139 -0
- package/src/commands/campaign-blueprints.ts +106 -0
- package/src/commands/campaigns.ts +469 -0
- package/src/commands/config.ts +77 -0
- package/src/commands/contacts.ts +612 -0
- package/src/commands/custom-attributes.ts +127 -0
- package/src/commands/dkims.ts +117 -0
- package/src/commands/domains.ts +82 -0
- package/src/commands/email-apis.ts +569 -0
- package/src/commands/emails.ts +197 -0
- package/src/commands/forms.ts +283 -0
- package/src/commands/interests.ts +155 -0
- package/src/commands/links.ts +38 -0
- package/src/commands/lists.ts +406 -0
- package/src/commands/logos.ts +71 -0
- package/src/commands/logs.ts +386 -0
- package/src/commands/reports.ts +306 -0
- package/src/commands/segments.ts +158 -0
- package/src/commands/senders.ts +204 -0
- package/src/commands/sub-accounts.ts +271 -0
- package/src/commands/suppressed-emails.ts +234 -0
- package/src/commands/suppressed.ts +198 -0
- package/src/commands/system-emails.ts +85 -0
- package/src/commands/tags.ts +146 -0
- package/src/commands/tasks.ts +116 -0
- package/src/commands/templates.ts +189 -0
- package/src/commands/tokens.ts +83 -0
- package/src/commands/transactional-emails.ts +374 -0
- package/src/commands/transactional-templates.ts +385 -0
- package/src/commands/users.ts +506 -0
- package/src/commands/webhooks.ts +172 -0
- package/src/commands/workflow-blueprints.ts +123 -0
- package/src/commands/workflows.ts +265 -0
- package/src/types/profile.ts +93 -0
- package/src/utils/auth.ts +272 -0
- package/src/utils/config-file.ts +96 -0
- package/src/utils/config.ts +134 -0
- package/src/utils/confirm.ts +32 -0
- package/src/utils/defaults.ts +99 -0
- package/src/utils/errors.ts +116 -0
- package/src/utils/interactive.ts +91 -0
- package/src/utils/list-defaults.ts +74 -0
- package/src/utils/output.ts +190 -0
- package/src/utils/progress.ts +320 -0
- package/src/utils/spinner.ts +22 -0
- package/tests/IMPLEMENTATION_STATUS.md +258 -0
- package/tests/PTY_SETUP.md +118 -0
- package/tests/PTY_TESTING_GUIDE.md +507 -0
- package/tests/README.md +244 -0
- package/tests/fixtures/api-responses/campaigns.json +34 -0
- package/tests/fixtures/test-config.json +13 -0
- package/tests/helpers/cli-runner.ts +128 -0
- package/tests/helpers/mock-server.ts +301 -0
- package/tests/helpers/pty-runner.ts +181 -0
- package/tests/integration/campaigns-real-api.test.ts +196 -0
- package/tests/integration/setup-integration.ts +50 -0
- package/tests/pty/campaigns.test.ts +241 -0
- package/tests/setup.ts +34 -0
- package/tsconfig.json +15 -0
- package/vitest.config.ts +28 -0
|
@@ -0,0 +1,432 @@
|
|
|
1
|
+
# Quick Start
|
|
2
|
+
|
|
3
|
+
Get up and running with the Cakemail CLI in 15 minutes. This tutorial walks you through sending your first transactional email and creating your first campaign.
|
|
4
|
+
|
|
5
|
+
## Prerequisites
|
|
6
|
+
|
|
7
|
+
Before starting, ensure you have:
|
|
8
|
+
|
|
9
|
+
1. **Installed the CLI** - See [Installation](/en/cli/getting-started/installation/)
|
|
10
|
+
2. **Configured authentication** - See [Authentication](/en/cli/getting-started/authentication/)
|
|
11
|
+
3. **Valid Cakemail credentials**
|
|
12
|
+
|
|
13
|
+
## Verify Installation
|
|
14
|
+
|
|
15
|
+
First, verify the CLI is installed and working:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
# Check version (no authentication required)
|
|
19
|
+
cakemail --version
|
|
20
|
+
|
|
21
|
+
# View help (no authentication required)
|
|
22
|
+
cakemail --help
|
|
23
|
+
|
|
24
|
+
# View command-specific help (no authentication required)
|
|
25
|
+
cakemail campaigns --help
|
|
26
|
+
|
|
27
|
+
# Test authentication
|
|
28
|
+
cakemail account show
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
**Note:** The `--version` and `--help` commands work without authentication, making it easy to explore the CLI before setting up credentials.
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Part 1: Send Your First Transactional Email
|
|
36
|
+
|
|
37
|
+
Let's send a simple transactional email using the Email API v2.
|
|
38
|
+
|
|
39
|
+
### Step 1: Verify Sender Email
|
|
40
|
+
|
|
41
|
+
Before sending emails, you need a verified sender email address.
|
|
42
|
+
|
|
43
|
+
**List existing senders:**
|
|
44
|
+
```bash
|
|
45
|
+
cakemail senders list
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
**If you don't have a sender, create one:**
|
|
49
|
+
```bash
|
|
50
|
+
cakemail senders create \
|
|
51
|
+
-n "Your Name" \
|
|
52
|
+
-e "your-email@example.com"
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
**Important**: Check your email inbox and click the confirmation link to verify the sender address.
|
|
56
|
+
|
|
57
|
+
**Check confirmation status:**
|
|
58
|
+
```bash
|
|
59
|
+
cakemail senders list
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Look for `confirmed: true` in the output.
|
|
63
|
+
|
|
64
|
+
### Step 2: Send a Simple Email
|
|
65
|
+
|
|
66
|
+
Send your first transactional email with HTML content:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
cakemail emails send \
|
|
70
|
+
-t recipient@example.com \
|
|
71
|
+
-s "My First Cakemail Email" \
|
|
72
|
+
--html "<h1>Hello from Cakemail!</h1><p>This is my first email sent via the CLI.</p>" \
|
|
73
|
+
--from-email your-email@example.com \
|
|
74
|
+
--from-name "Your Name"
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
**Expected Output:**
|
|
78
|
+
```json
|
|
79
|
+
{
|
|
80
|
+
"id": "abc123def456",
|
|
81
|
+
"status": "queued",
|
|
82
|
+
"to": "recipient@example.com",
|
|
83
|
+
"subject": "My First Cakemail Email",
|
|
84
|
+
"created_on": "2024-06-15T10:00:00Z"
|
|
85
|
+
}
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Step 3: Check Email Status
|
|
89
|
+
|
|
90
|
+
Get the status of your sent email:
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
cakemail emails get abc123def456
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
**Tip**: Replace `abc123def456` with the actual email ID from the previous step.
|
|
97
|
+
|
|
98
|
+
### Step 4: Send Email with Tracking
|
|
99
|
+
|
|
100
|
+
Send an email with open and click tracking enabled:
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
cakemail emails send \
|
|
104
|
+
-t recipient@example.com \
|
|
105
|
+
-s "Tracked Email" \
|
|
106
|
+
--html '<h1>Hello!</h1><p>Click <a href="https://example.com">here</a>.</p>' \
|
|
107
|
+
--from-email your-email@example.com \
|
|
108
|
+
--from-name "Your Name" \
|
|
109
|
+
--tracking \
|
|
110
|
+
--tags "tutorial,test"
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
**Tracking features:**
|
|
114
|
+
- `--tracking`: Enables open and click tracking
|
|
115
|
+
- `--tags`: Categorize emails for filtering in reports
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## Part 2: Create Your First Campaign
|
|
120
|
+
|
|
121
|
+
Now let's create and schedule a campaign to multiple contacts.
|
|
122
|
+
|
|
123
|
+
### Step 1: Create a Contact List
|
|
124
|
+
|
|
125
|
+
Create a list to hold your contacts:
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
cakemail lists create \
|
|
129
|
+
-n "Newsletter Subscribers" \
|
|
130
|
+
-l en
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
**Expected Output:**
|
|
134
|
+
```json
|
|
135
|
+
{
|
|
136
|
+
"id": 12345,
|
|
137
|
+
"name": "Newsletter Subscribers",
|
|
138
|
+
"language": "en",
|
|
139
|
+
"status": "active",
|
|
140
|
+
"created_on": "2024-06-15T10:05:00Z"
|
|
141
|
+
}
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
**Note the list ID** - you'll need it for the next steps.
|
|
145
|
+
|
|
146
|
+
### Step 2: Add Contacts to the List
|
|
147
|
+
|
|
148
|
+
Add some contacts to your list:
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
# Add first contact
|
|
152
|
+
cakemail contacts add 12345 \
|
|
153
|
+
-e "contact1@example.com" \
|
|
154
|
+
-f "John" \
|
|
155
|
+
-l "Doe"
|
|
156
|
+
|
|
157
|
+
# Add second contact
|
|
158
|
+
cakemail contacts add 12345 \
|
|
159
|
+
-e "contact2@example.com" \
|
|
160
|
+
-f "Jane" \
|
|
161
|
+
-l "Smith"
|
|
162
|
+
|
|
163
|
+
# Add third contact with custom data
|
|
164
|
+
cakemail contacts add 12345 \
|
|
165
|
+
-e "contact3@example.com" \
|
|
166
|
+
-f "Bob" \
|
|
167
|
+
-l "Johnson" \
|
|
168
|
+
-d '{"company":"Acme Inc"}'
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
**Verify contacts were added:**
|
|
172
|
+
```bash
|
|
173
|
+
cakemail -f table contacts list 12345
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
### Step 3: Create an Email Template
|
|
177
|
+
|
|
178
|
+
Create a template for your campaign:
|
|
179
|
+
|
|
180
|
+
```bash
|
|
181
|
+
cakemail templates create \
|
|
182
|
+
-n "Newsletter Template" \
|
|
183
|
+
--html '<html><body><h1>Monthly Newsletter</h1><p>Welcome {{first_name}}!</p><p>Here are this month's updates...</p></body></html>' \
|
|
184
|
+
--subject "Monthly Newsletter - June 2024"
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
**Expected Output:**
|
|
188
|
+
```json
|
|
189
|
+
{
|
|
190
|
+
"id": 789,
|
|
191
|
+
"name": "Newsletter Template",
|
|
192
|
+
"subject": "Monthly Newsletter - June 2024",
|
|
193
|
+
"created_on": "2024-06-15T10:10:00Z"
|
|
194
|
+
}
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
**Note the template ID** for the next step.
|
|
198
|
+
|
|
199
|
+
### Step 4: Create a Campaign
|
|
200
|
+
|
|
201
|
+
Now create a campaign linking your list, sender, and template:
|
|
202
|
+
|
|
203
|
+
```bash
|
|
204
|
+
cakemail campaigns create \
|
|
205
|
+
-n "June Newsletter" \
|
|
206
|
+
-l 12345 \
|
|
207
|
+
-s <sender-id> \
|
|
208
|
+
-t 789 \
|
|
209
|
+
--subject "Monthly Newsletter - June 2024"
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
**Get your sender ID:**
|
|
213
|
+
```bash
|
|
214
|
+
cakemail senders list
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
**Expected Output:**
|
|
218
|
+
```json
|
|
219
|
+
{
|
|
220
|
+
"id": 98765,
|
|
221
|
+
"name": "June Newsletter",
|
|
222
|
+
"status": "draft",
|
|
223
|
+
"list_id": 12345,
|
|
224
|
+
"sender_id": 456,
|
|
225
|
+
"template_id": 789,
|
|
226
|
+
"created_on": "2024-06-15T10:15:00Z"
|
|
227
|
+
}
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
### Step 5: Send a Test Email
|
|
231
|
+
|
|
232
|
+
Before scheduling, send a test to verify everything looks good:
|
|
233
|
+
|
|
234
|
+
```bash
|
|
235
|
+
cakemail campaigns test 98765 -e your-email@example.com
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
Check your inbox for the test email!
|
|
239
|
+
|
|
240
|
+
### Step 6: Schedule the Campaign
|
|
241
|
+
|
|
242
|
+
Schedule the campaign to send in the future:
|
|
243
|
+
|
|
244
|
+
```bash
|
|
245
|
+
# Schedule for tomorrow at 10 AM (adjust timezone as needed)
|
|
246
|
+
cakemail campaigns schedule 98765 -d "2024-06-16T10:00:00Z"
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
**Expected Output:**
|
|
250
|
+
```json
|
|
251
|
+
{
|
|
252
|
+
"id": 98765,
|
|
253
|
+
"name": "June Newsletter",
|
|
254
|
+
"status": "scheduled",
|
|
255
|
+
"scheduled_for": "2024-06-16T10:00:00Z"
|
|
256
|
+
}
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
### Step 7: Check Campaign Status
|
|
260
|
+
|
|
261
|
+
View your campaign details:
|
|
262
|
+
|
|
263
|
+
```bash
|
|
264
|
+
cakemail -f table campaigns get 98765
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
**List all campaigns:**
|
|
268
|
+
```bash
|
|
269
|
+
cakemail -f table campaigns list
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
---
|
|
273
|
+
|
|
274
|
+
## Part 3: View Analytics
|
|
275
|
+
|
|
276
|
+
After your email or campaign is sent, view analytics.
|
|
277
|
+
|
|
278
|
+
### Email API Analytics
|
|
279
|
+
|
|
280
|
+
View statistics for transactional emails:
|
|
281
|
+
|
|
282
|
+
```bash
|
|
283
|
+
# View summary
|
|
284
|
+
cakemail reports emails-summary
|
|
285
|
+
|
|
286
|
+
# View detailed stats for a date range
|
|
287
|
+
cakemail reports emails --from 2024-06-01 --to 2024-06-30
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
### Campaign Analytics
|
|
291
|
+
|
|
292
|
+
View analytics for your campaign:
|
|
293
|
+
|
|
294
|
+
```bash
|
|
295
|
+
# Campaign overview
|
|
296
|
+
cakemail reports campaign 98765
|
|
297
|
+
|
|
298
|
+
# Link-level analytics
|
|
299
|
+
cakemail reports campaign-links 98765
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
**Example Output:**
|
|
303
|
+
```json
|
|
304
|
+
{
|
|
305
|
+
"campaign_id": 98765,
|
|
306
|
+
"delivered": 3,
|
|
307
|
+
"opened": 2,
|
|
308
|
+
"clicked": 1,
|
|
309
|
+
"bounced": 0,
|
|
310
|
+
"unsubscribed": 0,
|
|
311
|
+
"open_rate": 0.67,
|
|
312
|
+
"click_rate": 0.33
|
|
313
|
+
}
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
---
|
|
317
|
+
|
|
318
|
+
## Part 4: Cleanup (Optional)
|
|
319
|
+
|
|
320
|
+
If this was just a test, clean up the resources:
|
|
321
|
+
|
|
322
|
+
```bash
|
|
323
|
+
# Unschedule campaign (if still scheduled)
|
|
324
|
+
cakemail campaigns unschedule 98765
|
|
325
|
+
|
|
326
|
+
# Delete campaign
|
|
327
|
+
cakemail campaigns delete 98765 --force
|
|
328
|
+
|
|
329
|
+
# Delete template
|
|
330
|
+
cakemail templates delete 789 --force
|
|
331
|
+
|
|
332
|
+
# Delete list (this also deletes contacts)
|
|
333
|
+
cakemail lists delete 12345 --force
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
**Warning**: `--force` flag skips confirmation prompts. Use carefully!
|
|
337
|
+
|
|
338
|
+
---
|
|
339
|
+
|
|
340
|
+
## Common Tasks Cheat Sheet
|
|
341
|
+
|
|
342
|
+
### Sending Emails
|
|
343
|
+
|
|
344
|
+
```bash
|
|
345
|
+
# Simple email
|
|
346
|
+
cakemail emails send -t user@example.com -s "Subject" --html "<p>Content</p>"
|
|
347
|
+
|
|
348
|
+
# With tracking
|
|
349
|
+
cakemail emails send -t user@example.com -s "Subject" --html "<p>Content</p>" --tracking
|
|
350
|
+
|
|
351
|
+
# Using template
|
|
352
|
+
cakemail emails send -t user@example.com -s "Subject" --template-id 123
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
### Managing Campaigns
|
|
356
|
+
|
|
357
|
+
```bash
|
|
358
|
+
# Create campaign
|
|
359
|
+
cakemail campaigns create -n "Campaign Name" -l <list-id> -s <sender-id> -t <template-id>
|
|
360
|
+
|
|
361
|
+
# Schedule campaign
|
|
362
|
+
cakemail campaigns schedule <id> -d "2024-12-25T10:00:00Z"
|
|
363
|
+
|
|
364
|
+
# Test campaign
|
|
365
|
+
cakemail campaigns test <id> -e test@example.com
|
|
366
|
+
|
|
367
|
+
# View campaign
|
|
368
|
+
cakemail campaigns get <id>
|
|
369
|
+
```
|
|
370
|
+
|
|
371
|
+
### Managing Contacts
|
|
372
|
+
|
|
373
|
+
```bash
|
|
374
|
+
# Create list
|
|
375
|
+
cakemail lists create -n "List Name" -l en
|
|
376
|
+
|
|
377
|
+
# Add contact
|
|
378
|
+
cakemail contacts add <list-id> -e "user@example.com" -f "First" -l "Last"
|
|
379
|
+
|
|
380
|
+
# List contacts
|
|
381
|
+
cakemail contacts list <list-id>
|
|
382
|
+
|
|
383
|
+
# Export contacts
|
|
384
|
+
cakemail contacts export <list-id> --format csv
|
|
385
|
+
```
|
|
386
|
+
|
|
387
|
+
### Viewing Analytics
|
|
388
|
+
|
|
389
|
+
```bash
|
|
390
|
+
# Campaign analytics
|
|
391
|
+
cakemail reports campaign <campaign-id>
|
|
392
|
+
|
|
393
|
+
# Email API stats
|
|
394
|
+
cakemail reports emails-summary
|
|
395
|
+
|
|
396
|
+
# Account overview
|
|
397
|
+
cakemail reports account
|
|
398
|
+
```
|
|
399
|
+
|
|
400
|
+
---
|
|
401
|
+
|
|
402
|
+
## Troubleshooting
|
|
403
|
+
|
|
404
|
+
### Email Not Sending
|
|
405
|
+
|
|
406
|
+
1. **Check sender verification**: `cakemail senders list`
|
|
407
|
+
2. **Verify authentication**: `cakemail account current`
|
|
408
|
+
3. **Check email status**: `cakemail emails get <email-id>`
|
|
409
|
+
|
|
410
|
+
### Campaign Not Scheduling
|
|
411
|
+
|
|
412
|
+
1. **Verify campaign exists**: `cakemail campaigns get <id>`
|
|
413
|
+
2. **Check campaign status**: Must be in `draft` status
|
|
414
|
+
3. **Validate datetime format**: Use ISO 8601 format (e.g., `2024-12-25T10:00:00Z`)
|
|
415
|
+
|
|
416
|
+
### Contacts Not Adding
|
|
417
|
+
|
|
418
|
+
1. **Verify list exists**: `cakemail lists get <list-id>`
|
|
419
|
+
2. **Check email format**: Must be valid email address
|
|
420
|
+
3. **Review error message**: CLI provides detailed error messages
|
|
421
|
+
|
|
422
|
+
For more troubleshooting, see [Troubleshooting](/en/cli/troubleshooting/).
|
|
423
|
+
|
|
424
|
+
---
|
|
425
|
+
|
|
426
|
+
## Get Help
|
|
427
|
+
|
|
428
|
+
- **Command help**: `cakemail <command> --help`
|
|
429
|
+
- **Full documentation**: Browse this user manual
|
|
430
|
+
- **Issues**: [GitHub Issues](https://github.com/cakemail-org/cakemail-cli/issues)
|
|
431
|
+
|
|
432
|
+
Happy emailing with Cakemail CLI!
|