@cakemail-org/cakemail-cli 1.5.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 +319 -15
- package/audit-formats.js +128 -0
- package/cakemail.rb +20 -0
- package/dist/cli.js +27 -10
- package/dist/cli.js.map +1 -1
- package/dist/client.d.ts +2 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +16 -6
- 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.d.ts.map +1 -1
- package/dist/commands/campaigns.js +103 -8
- package/dist/commands/campaigns.js.map +1 -1
- package/dist/commands/config.d.ts.map +1 -1
- package/dist/commands/config.js +63 -4
- package/dist/commands/config.js.map +1 -1
- package/dist/commands/contacts.d.ts.map +1 -1
- package/dist/commands/contacts.js +91 -12
- 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.d.ts +5 -0
- package/dist/commands/interests.d.ts.map +1 -0
- package/dist/commands/interests.js +172 -0
- package/dist/commands/interests.js.map +1 -0
- package/dist/commands/lists.d.ts.map +1 -1
- package/dist/commands/lists.js +6 -8
- package/dist/commands/lists.js.map +1 -1
- package/dist/commands/logs.d.ts +5 -0
- package/dist/commands/logs.d.ts.map +1 -0
- package/dist/commands/logs.js +237 -0
- package/dist/commands/logs.js.map +1 -0
- 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.d.ts.map +1 -1
- package/dist/commands/senders.js +11 -8
- 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.d.ts +5 -0
- package/dist/commands/tags.d.ts.map +1 -0
- package/dist/commands/tags.js +124 -0
- package/dist/commands/tags.js.map +1 -0
- package/dist/commands/templates.js +1 -1
- package/dist/commands/templates.js.map +1 -1
- package/dist/commands/transactional-templates.d.ts +5 -0
- package/dist/commands/transactional-templates.d.ts.map +1 -0
- package/dist/commands/transactional-templates.js +354 -0
- package/dist/commands/transactional-templates.js.map +1 -0
- package/dist/commands/webhooks.js +1 -1
- package/dist/commands/webhooks.js.map +1 -1
- package/dist/utils/auth.d.ts +8 -1
- package/dist/utils/auth.d.ts.map +1 -1
- package/dist/utils/auth.js +39 -11
- package/dist/utils/auth.js.map +1 -1
- package/dist/utils/config-file.d.ts +7 -0
- package/dist/utils/config-file.d.ts.map +1 -1
- package/dist/utils/config-file.js +15 -0
- package/dist/utils/config-file.js.map +1 -1
- package/dist/utils/config.d.ts +2 -0
- package/dist/utils/config.d.ts.map +1 -1
- package/dist/utils/config.js +12 -4
- 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/list-defaults.d.ts +33 -0
- package/dist/utils/list-defaults.d.ts.map +1 -0
- package/dist/utils/list-defaults.js +52 -0
- package/dist/utils/list-defaults.js.map +1 -0
- package/dist/utils/output.d.ts.map +1 -1
- package/dist/utils/output.js +36 -13
- package/dist/utils/output.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 -47
- 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,490 @@
|
|
|
1
|
+
# Senders
|
|
2
|
+
|
|
3
|
+
Manage and verify sender email addresses for transactional emails and campaigns.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
Senders are verified email addresses you can send from. Before sending emails, you must:
|
|
8
|
+
1. **Create a sender** with email and name
|
|
9
|
+
2. **Verify the email** by clicking confirmation link
|
|
10
|
+
3. **Use verified sender** in emails/campaigns
|
|
11
|
+
|
|
12
|
+
**Why verification is required:**
|
|
13
|
+
- Prevents email spoofing
|
|
14
|
+
- Improves deliverability
|
|
15
|
+
- Reduces spam complaints
|
|
16
|
+
- Required by email providers
|
|
17
|
+
|
|
18
|
+
## Sender Commands
|
|
19
|
+
|
|
20
|
+
### List Senders
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
cakemail senders list [options]
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
**Options:**
|
|
27
|
+
- `-l, --limit <number>` - Results per page
|
|
28
|
+
- `-p, --page <number>` - Page number
|
|
29
|
+
- `--sort <sort>` - Sort order
|
|
30
|
+
- `--filter <filter>` - Filter results
|
|
31
|
+
|
|
32
|
+
**Examples:**
|
|
33
|
+
```bash
|
|
34
|
+
# All senders
|
|
35
|
+
cakemail senders list
|
|
36
|
+
|
|
37
|
+
# Confirmed senders only
|
|
38
|
+
cakemail senders list --filter "confirmed==true"
|
|
39
|
+
|
|
40
|
+
# Sort by email
|
|
41
|
+
cakemail senders list --sort "+email"
|
|
42
|
+
|
|
43
|
+
# Unconfirmed senders
|
|
44
|
+
cakemail senders list --filter "confirmed==false"
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Get Sender Details
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
cakemail senders get <sender-id>
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
**Example:**
|
|
54
|
+
```bash
|
|
55
|
+
cakemail senders get abc123
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
**Output:**
|
|
59
|
+
```json
|
|
60
|
+
{
|
|
61
|
+
"id": "abc123",
|
|
62
|
+
"name": "John Doe",
|
|
63
|
+
"email": "john@example.com",
|
|
64
|
+
"confirmed": true,
|
|
65
|
+
"confirmed_on": "2024-06-15T10:00:00Z",
|
|
66
|
+
"created_on": "2024-06-15T09:50:00Z"
|
|
67
|
+
}
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Create Sender
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
cakemail senders create \
|
|
74
|
+
-n "Sender Name" \
|
|
75
|
+
-e "sender@example.com"
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
**Required Options:**
|
|
79
|
+
- `-n, --name <name>` - Display name for sender
|
|
80
|
+
- `-e, --email <email>` - Email address (must be valid)
|
|
81
|
+
|
|
82
|
+
**Examples:**
|
|
83
|
+
```bash
|
|
84
|
+
# Personal sender
|
|
85
|
+
cakemail senders create \
|
|
86
|
+
-n "John Doe" \
|
|
87
|
+
-e "john@example.com"
|
|
88
|
+
|
|
89
|
+
# Business sender
|
|
90
|
+
cakemail senders create \
|
|
91
|
+
-n "Acme Support" \
|
|
92
|
+
-e "support@acme.com"
|
|
93
|
+
|
|
94
|
+
# No-reply sender
|
|
95
|
+
cakemail senders create \
|
|
96
|
+
-n "Acme Notifications" \
|
|
97
|
+
-e "noreply@acme.com"
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
**After creation:**
|
|
101
|
+
1. Confirmation email sent to the address
|
|
102
|
+
2. Click confirmation link in email
|
|
103
|
+
3. Sender becomes verified
|
|
104
|
+
|
|
105
|
+
### Update Sender
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
cakemail senders update <sender-id> [options]
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
**Options:**
|
|
112
|
+
- `-n, --name <name>` - Update display name
|
|
113
|
+
- `-e, --email <email>` - Update email (requires re-verification)
|
|
114
|
+
|
|
115
|
+
**Examples:**
|
|
116
|
+
```bash
|
|
117
|
+
# Update name
|
|
118
|
+
cakemail senders update abc123 -n "John Smith"
|
|
119
|
+
|
|
120
|
+
# Update email (triggers new confirmation)
|
|
121
|
+
cakemail senders update abc123 -e "john.smith@example.com"
|
|
122
|
+
|
|
123
|
+
# Update both
|
|
124
|
+
cakemail senders update abc123 \
|
|
125
|
+
-n "John Smith" \
|
|
126
|
+
-e "john.smith@example.com"
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
**Note:** Changing email requires re-verification.
|
|
130
|
+
|
|
131
|
+
### Confirm Sender
|
|
132
|
+
|
|
133
|
+
Verify sender using confirmation ID from email:
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
cakemail senders confirm <confirmation-id>
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
**How to get confirmation ID:**
|
|
140
|
+
1. Create sender
|
|
141
|
+
2. Check email inbox
|
|
142
|
+
3. Click confirmation link or copy ID from link
|
|
143
|
+
4. Use ID with confirm command
|
|
144
|
+
|
|
145
|
+
**Example:**
|
|
146
|
+
```bash
|
|
147
|
+
cakemail senders confirm conf_abc123xyz456
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
### Resend Confirmation
|
|
151
|
+
|
|
152
|
+
If you didn't receive the confirmation email:
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
cakemail senders resend-confirmation <sender-id>
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
**Example:**
|
|
159
|
+
```bash
|
|
160
|
+
cakemail senders resend-confirmation abc123
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
### Delete Sender
|
|
164
|
+
|
|
165
|
+
```bash
|
|
166
|
+
cakemail senders delete <sender-id> [--force]
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
**Examples:**
|
|
170
|
+
```bash
|
|
171
|
+
# Interactive confirmation
|
|
172
|
+
cakemail senders delete abc123
|
|
173
|
+
|
|
174
|
+
# Skip confirmation
|
|
175
|
+
cakemail senders delete abc123 --force
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
**Warning:** Cannot delete senders used in active campaigns.
|
|
179
|
+
|
|
180
|
+
---
|
|
181
|
+
|
|
182
|
+
## Verification Process
|
|
183
|
+
|
|
184
|
+
### Step-by-Step
|
|
185
|
+
|
|
186
|
+
**1. Create sender:**
|
|
187
|
+
```bash
|
|
188
|
+
cakemail senders create \
|
|
189
|
+
-n "John Doe" \
|
|
190
|
+
-e "john@example.com"
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
**2. Check email:**
|
|
194
|
+
- Email sent to `john@example.com`
|
|
195
|
+
- Subject: "Confirm your sender email"
|
|
196
|
+
- Contains confirmation link
|
|
197
|
+
|
|
198
|
+
**3. Confirm (Option A - Click link):**
|
|
199
|
+
- Click link in email
|
|
200
|
+
- Redirects to confirmation page
|
|
201
|
+
- Sender automatically verified
|
|
202
|
+
|
|
203
|
+
**3. Confirm (Option B - Use CLI):**
|
|
204
|
+
```bash
|
|
205
|
+
# Get confirmation ID from email
|
|
206
|
+
cakemail senders confirm conf_abc123xyz456
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
**4. Verify confirmation:**
|
|
210
|
+
```bash
|
|
211
|
+
cakemail senders get abc123
|
|
212
|
+
# Check: "confirmed": true
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
### Troubleshooting Verification
|
|
216
|
+
|
|
217
|
+
**Didn't receive email:**
|
|
218
|
+
```bash
|
|
219
|
+
# Resend confirmation
|
|
220
|
+
cakemail senders resend-confirmation abc123
|
|
221
|
+
|
|
222
|
+
# Check spam folder
|
|
223
|
+
# Check email address is correct
|
|
224
|
+
# Wait a few minutes
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
**Confirmation link expired:**
|
|
228
|
+
```bash
|
|
229
|
+
# Resend confirmation (generates new link)
|
|
230
|
+
cakemail senders resend-confirmation abc123
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
**Wrong email address:**
|
|
234
|
+
```bash
|
|
235
|
+
# Update to correct email
|
|
236
|
+
cakemail senders update abc123 -e "correct@example.com"
|
|
237
|
+
|
|
238
|
+
# New confirmation sent to correct address
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
---
|
|
242
|
+
|
|
243
|
+
## Using Senders
|
|
244
|
+
|
|
245
|
+
### In Transactional Emails
|
|
246
|
+
|
|
247
|
+
```bash
|
|
248
|
+
cakemail emails send \
|
|
249
|
+
-t recipient@example.com \
|
|
250
|
+
-s "Subject" \
|
|
251
|
+
--html "<p>Content</p>" \
|
|
252
|
+
--from-email john@example.com \
|
|
253
|
+
--from-name "John Doe"
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
### In Campaigns
|
|
257
|
+
|
|
258
|
+
```bash
|
|
259
|
+
cakemail campaigns create \
|
|
260
|
+
-n "Campaign" \
|
|
261
|
+
-l <list-id> \
|
|
262
|
+
-s <sender-id> \
|
|
263
|
+
-t <template-id>
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
### Default Sender
|
|
267
|
+
|
|
268
|
+
Set a default sender in your account settings (via dashboard), or always specify with `--from-email`.
|
|
269
|
+
|
|
270
|
+
---
|
|
271
|
+
|
|
272
|
+
## Sender Management
|
|
273
|
+
|
|
274
|
+
### Organizing Senders
|
|
275
|
+
|
|
276
|
+
**By purpose:**
|
|
277
|
+
- Marketing: `marketing@example.com`
|
|
278
|
+
- Transactional: `orders@example.com`, `support@example.com`
|
|
279
|
+
- Notifications: `noreply@example.com`
|
|
280
|
+
|
|
281
|
+
**By brand:**
|
|
282
|
+
- Main brand: `hello@acme.com`
|
|
283
|
+
- Sub-brands: `hello@acmewidgets.com`
|
|
284
|
+
|
|
285
|
+
### Best Practices
|
|
286
|
+
|
|
287
|
+
#### 1. Verify All Senders Immediately
|
|
288
|
+
|
|
289
|
+
```bash
|
|
290
|
+
# Create sender
|
|
291
|
+
ID=$(cakemail senders create -n "Support" -e "support@example.com" | jq -r '.id')
|
|
292
|
+
|
|
293
|
+
# Check email and confirm right away
|
|
294
|
+
cakemail senders confirm <confirmation-id>
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
#### 2. Use Descriptive Names
|
|
298
|
+
|
|
299
|
+
```bash
|
|
300
|
+
# ✅ Good
|
|
301
|
+
cakemail senders create -n "Acme Support Team" -e "support@acme.com"
|
|
302
|
+
cakemail senders create -n "Acme Orders" -e "orders@acme.com"
|
|
303
|
+
|
|
304
|
+
# ❌ Avoid
|
|
305
|
+
cakemail senders create -n "Sender 1" -e "support@acme.com"
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
#### 3. Separate Transactional and Marketing
|
|
309
|
+
|
|
310
|
+
```bash
|
|
311
|
+
# Transactional
|
|
312
|
+
cakemail senders create -n "Orders" -e "orders@example.com"
|
|
313
|
+
cakemail senders create -n "Support" -e "support@example.com"
|
|
314
|
+
|
|
315
|
+
# Marketing
|
|
316
|
+
cakemail senders create -n "Newsletter" -e "news@example.com"
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
#### 4. Don't Delete Active Senders
|
|
320
|
+
|
|
321
|
+
```bash
|
|
322
|
+
# Check usage first
|
|
323
|
+
cakemail campaigns list --filter "sender_id==abc123"
|
|
324
|
+
|
|
325
|
+
# If campaigns exist, don't delete
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
#### 5. Keep Senders List Clean
|
|
329
|
+
|
|
330
|
+
```bash
|
|
331
|
+
# List unconfirmed senders
|
|
332
|
+
cakemail senders list --filter "confirmed==false"
|
|
333
|
+
|
|
334
|
+
# Delete or resend confirmation
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
---
|
|
338
|
+
|
|
339
|
+
## Practical Examples
|
|
340
|
+
|
|
341
|
+
### Example 1: Setup New Domain
|
|
342
|
+
|
|
343
|
+
```bash
|
|
344
|
+
#!/bin/bash
|
|
345
|
+
# setup-senders.sh - Setup senders for new domain
|
|
346
|
+
|
|
347
|
+
DOMAIN="example.com"
|
|
348
|
+
|
|
349
|
+
# Create senders
|
|
350
|
+
cakemail senders create -n "No Reply" -e "noreply@$DOMAIN"
|
|
351
|
+
cakemail senders create -n "Support" -e "support@$DOMAIN"
|
|
352
|
+
cakemail senders create -n "Orders" -e "orders@$DOMAIN"
|
|
353
|
+
cakemail senders create -n "Marketing" -e "marketing@$DOMAIN"
|
|
354
|
+
|
|
355
|
+
echo "Senders created. Check email to verify."
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
### Example 2: Verify All Pending
|
|
359
|
+
|
|
360
|
+
```bash
|
|
361
|
+
#!/bin/bash
|
|
362
|
+
# verify-pending.sh - List unverified senders
|
|
363
|
+
|
|
364
|
+
echo "Unverified senders:"
|
|
365
|
+
cakemail -f table senders list --filter "confirmed==false"
|
|
366
|
+
|
|
367
|
+
echo ""
|
|
368
|
+
echo "Resend confirmations? (y/n)"
|
|
369
|
+
read -r response
|
|
370
|
+
|
|
371
|
+
if [ "$response" = "y" ]; then
|
|
372
|
+
# Get IDs of unconfirmed senders
|
|
373
|
+
IDS=$(cakemail -f json senders list --filter "confirmed==false" | jq -r '.data[].id')
|
|
374
|
+
|
|
375
|
+
for ID in $IDS; do
|
|
376
|
+
echo "Resending confirmation for $ID..."
|
|
377
|
+
cakemail senders resend-confirmation "$ID"
|
|
378
|
+
done
|
|
379
|
+
|
|
380
|
+
echo "Confirmation emails sent!"
|
|
381
|
+
fi
|
|
382
|
+
```
|
|
383
|
+
|
|
384
|
+
### Example 3: Audit Senders
|
|
385
|
+
|
|
386
|
+
```bash
|
|
387
|
+
#!/bin/bash
|
|
388
|
+
# audit-senders.sh - Check sender status
|
|
389
|
+
|
|
390
|
+
echo "=== Sender Audit ==="
|
|
391
|
+
echo ""
|
|
392
|
+
|
|
393
|
+
TOTAL=$(cakemail -f json senders list --limit 1 | jq '.total')
|
|
394
|
+
CONFIRMED=$(cakemail -f json senders list --filter "confirmed==true" --limit 1 | jq '.total')
|
|
395
|
+
UNCONFIRMED=$(cakemail -f json senders list --filter "confirmed==false" --limit 1 | jq '.total')
|
|
396
|
+
|
|
397
|
+
echo "Total senders: $TOTAL"
|
|
398
|
+
echo "Confirmed: $CONFIRMED"
|
|
399
|
+
echo "Unconfirmed: $UNCONFIRMED"
|
|
400
|
+
echo ""
|
|
401
|
+
|
|
402
|
+
if [ "$UNCONFIRMED" -gt 0 ]; then
|
|
403
|
+
echo "Unconfirmed senders:"
|
|
404
|
+
cakemail -f compact senders list --filter "confirmed==false"
|
|
405
|
+
fi
|
|
406
|
+
```
|
|
407
|
+
|
|
408
|
+
---
|
|
409
|
+
|
|
410
|
+
## Domain Configuration
|
|
411
|
+
|
|
412
|
+
### DNS Setup
|
|
413
|
+
|
|
414
|
+
For best deliverability, configure these DNS records:
|
|
415
|
+
|
|
416
|
+
**SPF Record:**
|
|
417
|
+
```
|
|
418
|
+
v=spf1 include:_spf.cakemail.com ~all
|
|
419
|
+
```
|
|
420
|
+
|
|
421
|
+
**DKIM Record:**
|
|
422
|
+
Configure via Cakemail dashboard
|
|
423
|
+
|
|
424
|
+
**DMARC Record:**
|
|
425
|
+
```
|
|
426
|
+
v=DMARC1; p=none; rua=mailto:dmarc@example.com
|
|
427
|
+
```
|
|
428
|
+
|
|
429
|
+
**Check DNS:**
|
|
430
|
+
```bash
|
|
431
|
+
# Check SPF
|
|
432
|
+
dig +short TXT example.com | grep spf
|
|
433
|
+
|
|
434
|
+
# Check DKIM
|
|
435
|
+
dig +short TXT default._domainkey.example.com
|
|
436
|
+
```
|
|
437
|
+
|
|
438
|
+
---
|
|
439
|
+
|
|
440
|
+
## Troubleshooting
|
|
441
|
+
|
|
442
|
+
### Cannot Send Emails
|
|
443
|
+
|
|
444
|
+
**Check sender verification:**
|
|
445
|
+
```bash
|
|
446
|
+
cakemail senders list --filter "email==sender@example.com"
|
|
447
|
+
# Verify: "confirmed": true
|
|
448
|
+
```
|
|
449
|
+
|
|
450
|
+
**If unconfirmed:**
|
|
451
|
+
```bash
|
|
452
|
+
cakemail senders resend-confirmation <id>
|
|
453
|
+
```
|
|
454
|
+
|
|
455
|
+
### "Sender not found" Error
|
|
456
|
+
|
|
457
|
+
**Verify sender exists:**
|
|
458
|
+
```bash
|
|
459
|
+
cakemail senders list
|
|
460
|
+
```
|
|
461
|
+
|
|
462
|
+
**Check sender ID:**
|
|
463
|
+
```bash
|
|
464
|
+
# Get correct ID
|
|
465
|
+
ID=$(cakemail senders list --filter "email==sender@example.com" | jq -r '.data[0].id')
|
|
466
|
+
echo $ID
|
|
467
|
+
```
|
|
468
|
+
|
|
469
|
+
### Confirmation Email Not Arriving
|
|
470
|
+
|
|
471
|
+
**Possible causes:**
|
|
472
|
+
1. Spam folder - Check spam/junk
|
|
473
|
+
2. Email typo - Verify address is correct
|
|
474
|
+
3. Email server delay - Wait 5-10 minutes
|
|
475
|
+
4. Blocked email - Check email server logs
|
|
476
|
+
|
|
477
|
+
**Solutions:**
|
|
478
|
+
```bash
|
|
479
|
+
# Verify email address
|
|
480
|
+
cakemail senders get <id>
|
|
481
|
+
|
|
482
|
+
# Update if wrong
|
|
483
|
+
cakemail senders update <id> -e "correct@example.com"
|
|
484
|
+
|
|
485
|
+
# Resend
|
|
486
|
+
cakemail senders resend-confirmation <id>
|
|
487
|
+
```
|
|
488
|
+
|
|
489
|
+
---
|
|
490
|
+
|