@bigbinary/neeto-email-pipeline-frontend 1.0.3 → 1.0.4
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/README.md +353 -44
- package/app/javascript/src/translations/ar.json +8 -3
- package/app/javascript/src/translations/bg.json +8 -3
- package/app/javascript/src/translations/ca.json +8 -3
- package/app/javascript/src/translations/cs.json +8 -3
- package/app/javascript/src/translations/da.json +8 -3
- package/app/javascript/src/translations/de.json +8 -3
- package/app/javascript/src/translations/es-MX.json +8 -3
- package/app/javascript/src/translations/es.json +8 -3
- package/app/javascript/src/translations/et.json +8 -3
- package/app/javascript/src/translations/fi.json +8 -3
- package/app/javascript/src/translations/fil.json +8 -3
- package/app/javascript/src/translations/fr.json +8 -3
- package/app/javascript/src/translations/he.json +8 -3
- package/app/javascript/src/translations/hi.json +8 -3
- package/app/javascript/src/translations/hr.json +8 -3
- package/app/javascript/src/translations/hu.json +8 -3
- package/app/javascript/src/translations/id.json +8 -3
- package/app/javascript/src/translations/it.json +8 -3
- package/app/javascript/src/translations/ja.json +8 -3
- package/app/javascript/src/translations/ko.json +8 -3
- package/app/javascript/src/translations/nl.json +8 -3
- package/app/javascript/src/translations/pl.json +8 -3
- package/app/javascript/src/translations/pt-BR.json +8 -3
- package/app/javascript/src/translations/pt.json +8 -3
- package/app/javascript/src/translations/ro.json +8 -3
- package/app/javascript/src/translations/ru.json +8 -3
- package/app/javascript/src/translations/sk.json +8 -3
- package/app/javascript/src/translations/sl.json +8 -3
- package/app/javascript/src/translations/sv.json +8 -3
- package/app/javascript/src/translations/th.json +8 -3
- package/app/javascript/src/translations/tr.json +8 -3
- package/app/javascript/src/translations/uk.json +8 -3
- package/app/javascript/src/translations/vi.json +8 -3
- package/app/javascript/src/translations/zh-CN.json +8 -3
- package/app/javascript/src/translations/zh-TW.json +8 -3
- package/dist/.ready +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,19 +1,111 @@
|
|
|
1
1
|
# neeto-email-pipeline-nano
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
A Rails engine that consolidates all outbound email infrastructure for neeto
|
|
4
|
+
apps: email prefixing, interception, rate limiting, delivery logging, and
|
|
5
|
+
SparkPost webhook handling.
|
|
5
6
|
|
|
6
7
|
## Contents
|
|
7
8
|
|
|
8
|
-
1. [
|
|
9
|
+
1. [Architecture Overview](#architecture-overview)
|
|
10
|
+
2. [Development with Host Application](#development-with-host-application)
|
|
9
11
|
- [Engine](#engine)
|
|
10
12
|
- [Installation](#installation)
|
|
11
|
-
- [
|
|
12
|
-
- [Frontend
|
|
13
|
+
- [Configuration](#configuration)
|
|
14
|
+
- [Frontend Package](#frontend-package)
|
|
13
15
|
- [Installation](#installation-1)
|
|
14
|
-
- [
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
- [Components](#components)
|
|
17
|
+
3. [Features](#features)
|
|
18
|
+
- [Email Prefixer](#email-prefixer)
|
|
19
|
+
- [Email Interception](#email-interception)
|
|
20
|
+
- [Rate Limiting](#rate-limiting)
|
|
21
|
+
- [Email Logging](#email-logging)
|
|
22
|
+
- [SparkPost Webhooks](#sparkpost-webhooks)
|
|
23
|
+
4. [Testing Locally](#testing-locally)
|
|
24
|
+
5. [Instructions for Publishing](#instructions-for-publishing)
|
|
25
|
+
|
|
26
|
+
## Architecture Overview
|
|
27
|
+
|
|
28
|
+
Every outbound email passes through the following pipeline, whether sent via
|
|
29
|
+
`deliver_later` (Sidekiq) or `deliver_now` (inline). The engine detects the
|
|
30
|
+
delivery path automatically and captures organization context from Sidekiq
|
|
31
|
+
middleware or custom mail headers accordingly.
|
|
32
|
+
|
|
33
|
+
```mermaid
|
|
34
|
+
flowchart TD
|
|
35
|
+
A[Mailer.deliver_later] --> B[Sidekiq Queue]
|
|
36
|
+
B --> C["EmailLogMiddleware
|
|
37
|
+
Generates UUID, sets Thread.current context"]
|
|
38
|
+
C --> D["MailThrottleMiddleware
|
|
39
|
+
Checks hourly rate limit per org"]
|
|
40
|
+
|
|
41
|
+
D -->|Rate limited| E["Reschedule job with backoff
|
|
42
|
+
Preserves email_log_uuid in job hash"]
|
|
43
|
+
E --> R["EmailLogMiddleware handle_post_yield
|
|
44
|
+
Creates rate_limited placeholder
|
|
45
|
+
(email: nil, rate_limited_at set)"]
|
|
46
|
+
R -->|"Job re-enters queue
|
|
47
|
+
with same UUID"| B
|
|
48
|
+
|
|
49
|
+
D -->|Allowed| F[Build Mail Object]
|
|
50
|
+
|
|
51
|
+
DN[Mailer.deliver_now] --> DN1["after_action callback
|
|
52
|
+
Sets X-Neeto-Organization-Id,
|
|
53
|
+
X-Mailer-Class, X-Mailer-Action headers"]
|
|
54
|
+
DN1 --> F
|
|
55
|
+
|
|
56
|
+
F --> G["EmailPrefixer
|
|
57
|
+
Adds [STAGING]/[DEV] prefix to subject"]
|
|
58
|
+
G --> H["Interceptor
|
|
59
|
+
Drops/forwards based on environment"]
|
|
60
|
+
H -->|Dropped| I["LoggingInterceptor
|
|
61
|
+
Mark as dropped with reason"]
|
|
62
|
+
H -->|Allowed| J["LoggingInterceptor
|
|
63
|
+
Deletes rate_limited placeholder (if any),
|
|
64
|
+
creates per-recipient log records
|
|
65
|
+
with rate_limited_at preserved"]
|
|
66
|
+
J --> K[Mail Delivery]
|
|
67
|
+
K --> L["LoggingObserver
|
|
68
|
+
Mark queued records as handed_over"]
|
|
69
|
+
L --> M{Delivery Method?}
|
|
70
|
+
M -->|SparkPost| N[SparkPost Delivers Email]
|
|
71
|
+
N --> O[SparkPost Webhook]
|
|
72
|
+
O --> P["SparkpostWebhookJob
|
|
73
|
+
Match via email_log_uuid in rcpt_meta"]
|
|
74
|
+
P --> Q2[Update Status: Delivered / Bounced / Spam]
|
|
75
|
+
M -->|Gmail / Outlook / SMTP| S["Final status: handed_over
|
|
76
|
+
No further tracking available"]
|
|
77
|
+
|
|
78
|
+
C -->|Exception| Q[Mark as Failed]
|
|
79
|
+
|
|
80
|
+
style DN fill:#60a5fa,color:#000
|
|
81
|
+
style DN1 fill:#60a5fa,color:#000
|
|
82
|
+
style E fill:#fbbf24,color:#000
|
|
83
|
+
style R fill:#fbbf24,color:#000
|
|
84
|
+
style I fill:#f87171,color:#000
|
|
85
|
+
style Q2 fill:#34d399,color:#000
|
|
86
|
+
style S fill:#94a3b8,color:#000
|
|
87
|
+
style Q fill:#f87171,color:#000
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
> **deliver_now vs deliver_later:** The `deliver_later` path (yellow nodes) goes
|
|
91
|
+
> through Sidekiq middleware for rate limiting and context setup. The
|
|
92
|
+
> `deliver_now` path (blue nodes) skips Sidekiq entirely — organization context
|
|
93
|
+
> is provided via custom mail headers (`X-Neeto-Organization-Id`,
|
|
94
|
+
> `X-Mailer-Class`, `X-Mailer-Action`) set by an `after_action` callback. These
|
|
95
|
+
> headers are stripped before the email leaves the system.
|
|
96
|
+
|
|
97
|
+
### Email Lifecycle Statuses
|
|
98
|
+
|
|
99
|
+
| Status | Meaning |
|
|
100
|
+
| ---------------- | ------------------------------------------------------------------------------ |
|
|
101
|
+
| `queued` | Email entered the system |
|
|
102
|
+
| `rate_limited` | Temporarily held due to hourly send limit |
|
|
103
|
+
| `dropped` | Blocked before sending (too many recipients, blocked content, bounced address) |
|
|
104
|
+
| `handed_over` | Successfully passed to SparkPost for delivery |
|
|
105
|
+
| `delivered` | SparkPost confirmed delivery to recipient's mail server |
|
|
106
|
+
| `bounced` | Delivery failed (invalid address, full mailbox, policy rejection) |
|
|
107
|
+
| `spam_complaint` | Recipient marked the email as spam |
|
|
108
|
+
| `failed` | System error before handover (SMTP failure, mail construction error) |
|
|
17
109
|
|
|
18
110
|
## Development with Host Application
|
|
19
111
|
|
|
@@ -21,87 +113,304 @@ structure, configs, data etc.
|
|
|
21
113
|
|
|
22
114
|
#### Installation
|
|
23
115
|
|
|
24
|
-
1. Add
|
|
116
|
+
1. Add the gem to your application's Gemfile:
|
|
25
117
|
|
|
26
118
|
```ruby
|
|
27
|
-
|
|
28
|
-
|
|
119
|
+
source "NEETO_GEM_SERVER_URL" do
|
|
120
|
+
# ..existing gems
|
|
29
121
|
|
|
30
|
-
|
|
31
|
-
|
|
122
|
+
gem 'neeto-email-pipeline-engine'
|
|
123
|
+
end
|
|
32
124
|
```
|
|
33
125
|
|
|
34
|
-
2.
|
|
126
|
+
2. Install the gem:
|
|
35
127
|
|
|
36
128
|
```shell
|
|
37
129
|
bundle install
|
|
38
130
|
```
|
|
39
131
|
|
|
40
|
-
3.
|
|
132
|
+
3. Mount the engine in `config/routes.rb`:
|
|
41
133
|
|
|
42
134
|
```ruby
|
|
43
|
-
|
|
135
|
+
mount NeetoEmailPipelineEngine::Engine, at: "/neeto_email_pipeline"
|
|
44
136
|
```
|
|
45
137
|
|
|
46
|
-
4.
|
|
47
|
-
commands to copy the migrations from the engine to the host application.
|
|
138
|
+
4. Copy and run migrations:
|
|
48
139
|
|
|
49
140
|
```shell
|
|
50
141
|
bundle exec rails neeto_email_pipeline_engine:install:migrations
|
|
51
142
|
bundle exec rails db:migrate
|
|
52
143
|
```
|
|
53
144
|
|
|
54
|
-
####
|
|
145
|
+
#### Configuration
|
|
55
146
|
|
|
56
|
-
|
|
147
|
+
##### constants.yml
|
|
57
148
|
|
|
58
|
-
|
|
59
|
-
following file.
|
|
149
|
+
Add the following to your `config/constants.yml`:
|
|
60
150
|
|
|
61
|
-
|
|
151
|
+
```yaml
|
|
152
|
+
defaults: &defaults
|
|
153
|
+
email_pipeline:
|
|
154
|
+
email_logging_enabled: true
|
|
155
|
+
retention_days: 30
|
|
62
156
|
|
|
63
|
-
|
|
157
|
+
development:
|
|
158
|
+
<<: *defaults
|
|
64
159
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
160
|
+
test:
|
|
161
|
+
<<: *defaults
|
|
162
|
+
|
|
163
|
+
staging:
|
|
164
|
+
<<: *defaults
|
|
165
|
+
|
|
166
|
+
production:
|
|
167
|
+
<<: *defaults
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
##### secrets.yml (via Vault)
|
|
68
171
|
|
|
69
|
-
|
|
172
|
+
Add SparkPost webhook credentials to `config/secrets.yml`:
|
|
70
173
|
|
|
71
|
-
|
|
72
|
-
|
|
174
|
+
```yaml
|
|
175
|
+
defaults: &defaults
|
|
176
|
+
email_pipeline:
|
|
177
|
+
sparkpost_webhook_username: <%= ENV['...'] %>
|
|
178
|
+
sparkpost_webhook_password: <%= ENV['...'] %>
|
|
179
|
+
```
|
|
73
180
|
|
|
74
|
-
|
|
181
|
+
##### Scheduled Jobs
|
|
182
|
+
|
|
183
|
+
Add the purge job to `config/scheduled_jobs.yml`:
|
|
184
|
+
|
|
185
|
+
```yaml
|
|
186
|
+
purge_old_email_logs:
|
|
187
|
+
cron: "0 3 * * *"
|
|
188
|
+
class: NeetoEmailPipelineEngine::PurgeOldEmailLogsJob
|
|
189
|
+
description: "Purge email logs older than retention period"
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
### Frontend Package
|
|
75
193
|
|
|
76
194
|
#### Installation
|
|
77
195
|
|
|
78
|
-
1. Add the
|
|
196
|
+
1. Add the package:
|
|
79
197
|
|
|
80
198
|
```shell
|
|
81
199
|
yarn add @bigbinary/neeto-email-pipeline-frontend
|
|
82
200
|
```
|
|
83
201
|
|
|
84
|
-
|
|
202
|
+
2. Install peer dependencies (neetoui, neeto-molecules, neeto-commons-frontend,
|
|
203
|
+
neeto-filters-frontend, etc.) if not already present.
|
|
204
|
+
|
|
205
|
+
#### Components
|
|
206
|
+
|
|
207
|
+
The package exports the `EmailLogs` component:
|
|
208
|
+
|
|
209
|
+
```jsx
|
|
210
|
+
import { EmailLogs } from "@bigbinary/neeto-email-pipeline-frontend";
|
|
211
|
+
|
|
212
|
+
<EmailLogs
|
|
213
|
+
canViewEmailLogs={true}
|
|
214
|
+
breadcrumbs={[
|
|
215
|
+
{ text: "Admin panel", link: "/admin" },
|
|
216
|
+
{ text: "Email Logs" },
|
|
217
|
+
]}
|
|
218
|
+
helpUrl="https://neetocalhelp.neetokb.com/p/a-8ed45325"
|
|
219
|
+
/>;
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
**Props:**
|
|
223
|
+
|
|
224
|
+
| Prop | Type | Required | Description |
|
|
225
|
+
| ------------------ | --------- | -------- | ---------------------------------------------------------------- |
|
|
226
|
+
| `canViewEmailLogs` | `boolean` | Yes | Permission gate. If `false`, nothing renders. |
|
|
227
|
+
| `breadcrumbs` | `array` | Yes | Breadcrumb trail for the Header component. |
|
|
228
|
+
| `helpUrl` | `string` | No | URL for the help article. Renders a help icon next to the title. |
|
|
229
|
+
|
|
230
|
+
## Features
|
|
231
|
+
|
|
232
|
+
### Email Prefixer
|
|
233
|
+
|
|
234
|
+
Adds environment prefix to email subjects in non-production environments (e.g.,
|
|
235
|
+
`[STAGING]`, `[DEVELOPMENT]`). Also supports per-organization custom prefixes
|
|
236
|
+
via the `email_prefix` field on the Organization model.
|
|
237
|
+
|
|
238
|
+
**Requires:** Every mailer must be called with `organization_id` in params:
|
|
239
|
+
|
|
240
|
+
```ruby
|
|
241
|
+
UserMailer.with(organization_id: org.id).welcome_email.deliver_later
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
### Email Interception
|
|
245
|
+
|
|
246
|
+
The `Interceptor` controls which emails are actually sent based on the
|
|
247
|
+
environment:
|
|
248
|
+
|
|
249
|
+
**Staging/Development:**
|
|
250
|
+
|
|
251
|
+
- Forwards emails to configured addresses (`mail_interceptor.forward_emails_to`
|
|
252
|
+
in secrets)
|
|
253
|
+
- Whitelists specific addresses (`mail_interceptor.whitelisted_emails` in
|
|
254
|
+
secrets)
|
|
255
|
+
- Intercepts emails matching `^cpt.*bigbinary\.com$`
|
|
256
|
+
|
|
257
|
+
**Production:**
|
|
258
|
+
|
|
259
|
+
- Filters out emails to `@example.com` and `@example.net`
|
|
260
|
+
|
|
261
|
+
**All environments — emails are dropped when:**
|
|
262
|
+
|
|
263
|
+
- More than 10 unique recipients across To, CC, and BCC
|
|
264
|
+
- Subject or body contains blocked content patterns (`depop`, `dep0p`)
|
|
265
|
+
- All recipients have bounced 2+ times (checked via NeetoTower API)
|
|
266
|
+
|
|
267
|
+
The drop reason is recorded in the email log's `status_detail` field.
|
|
268
|
+
|
|
269
|
+
> **Note:** If the NeetoTower API is unavailable (timeout, connection refused,
|
|
270
|
+
> 5xx error), the engine treats the bounce count as 0 and allows the email to be
|
|
271
|
+
> sent. Errors are reported to Honeybadger for visibility.
|
|
272
|
+
|
|
273
|
+
### Rate Limiting
|
|
274
|
+
|
|
275
|
+
The `MailThrottleMiddleware` enforces per-organization hourly email send limits:
|
|
276
|
+
|
|
277
|
+
- Configured via `organization.max_hourly_emails`.
|
|
278
|
+
- Can be globally overridden with `GLOBAL_HOURLY_EMAIL_LIMIT_FOR_ALL_ORGS` env
|
|
279
|
+
var
|
|
280
|
+
- Rate limiting is enabled by default in production, controlled by
|
|
281
|
+
`RATE_LIMIT_ENGINE_ENABLED` env var
|
|
282
|
+
- When rate limited, the job is rescheduled with exponential backoff (60s to
|
|
283
|
+
30min)
|
|
284
|
+
- A notification is sent to the organization (deduplicated per 10-minute window)
|
|
285
|
+
|
|
286
|
+
### Email Logging
|
|
85
287
|
|
|
86
|
-
|
|
87
|
-
[Frontend package development guide](https://neeto-engineering.neetokb.com/p/a-d34cb4b0)
|
|
88
|
-
for step-by-step instructions to develop the frontend package.
|
|
288
|
+
When `email_logging_enabled` is `true`, every outbound email is tracked with:
|
|
89
289
|
|
|
90
|
-
|
|
290
|
+
- **Per-recipient records**: One row per recipient (to/cc/bcc) with email,
|
|
291
|
+
subject, from, delivery method
|
|
292
|
+
- **Email body capture**: HTML body stored for preview in the admin UI
|
|
293
|
+
- **Full lifecycle tracking**: queued → rate_limited → handed_over →
|
|
294
|
+
delivered/bounced/spam_complaint
|
|
295
|
+
- **Rate limit awareness**: Records carry `rate_limited_at` timestamp when the
|
|
296
|
+
email was throttled
|
|
297
|
+
- **Automatic purge**: `PurgeOldEmailLogsJob` deletes records older than
|
|
298
|
+
`retention_days`
|
|
91
299
|
|
|
92
|
-
|
|
93
|
-
|
|
300
|
+
> **deliver_now support:** Emails sent via `deliver_now` are also logged. Since
|
|
301
|
+
> these emails bypass Sidekiq middleware, the engine reads organization context
|
|
302
|
+
> from custom mail headers (`X-Neeto-Organization-Id`, `X-Mailer-Class`,
|
|
303
|
+
> `X-Mailer-Action`) that are set by an `after_action` callback in the mailer.
|
|
304
|
+
> The headers are stripped before delivery so they never reach the recipient.
|
|
94
305
|
|
|
95
|
-
|
|
96
|
-
import React from "react";
|
|
306
|
+
### SparkPost Webhooks
|
|
97
307
|
|
|
98
|
-
|
|
308
|
+
The engine provides a webhook endpoint for SparkPost delivery events:
|
|
99
309
|
|
|
100
|
-
|
|
310
|
+
**Endpoint:** `POST /neeto_email_pipeline/webhooks/sparkpost/events`
|
|
101
311
|
|
|
102
|
-
|
|
312
|
+
**Authentication:** HTTP Basic Auth using credentials from vault.
|
|
313
|
+
|
|
314
|
+
**Handled events:**
|
|
315
|
+
|
|
316
|
+
- `delivery` → status: `delivered`
|
|
317
|
+
- `bounce`, `out_of_band`, `policy_rejection` → status: `bounced`
|
|
318
|
+
- `spam_complaint` → status: `spam_complaint`
|
|
319
|
+
|
|
320
|
+
**Correlation:** The `LoggingInterceptor` injects `email_log_uuid` into the
|
|
321
|
+
`X-MSYS-API` header metadata. SparkPost echoes this back in webhook events via
|
|
322
|
+
`rcpt_meta.email_log_uuid`, which the `SparkpostWebhookJob` uses to find the
|
|
323
|
+
exact recipient record.
|
|
324
|
+
|
|
325
|
+
#### SparkPost Setup
|
|
326
|
+
|
|
327
|
+
1. Go to SparkPost → Webhooks → Create Webhook
|
|
328
|
+
2. **Target URL:**
|
|
329
|
+
`https://app.yourproduct.com/neeto_email_pipeline/webhooks/sparkpost/events`
|
|
330
|
+
3. **Authentication:** HTTP Basic with username/password from your vault config
|
|
331
|
+
4. **Events to subscribe:**
|
|
332
|
+
- Delivery: `delivery`
|
|
333
|
+
- Bounce: `bounce`, `out_of_band`, `policy_rejection`
|
|
334
|
+
- Spam: `spam_complaint`
|
|
335
|
+
|
|
336
|
+
## Testing Locally
|
|
337
|
+
|
|
338
|
+
### Email Interception
|
|
339
|
+
|
|
340
|
+
To test email forwarding in development, add the following to
|
|
341
|
+
`config/secrets.yml`:
|
|
342
|
+
|
|
343
|
+
```yaml
|
|
344
|
+
development:
|
|
345
|
+
mail_interceptor:
|
|
346
|
+
forward_emails_to: "your-email@bigbinary.com"
|
|
347
|
+
whitelisted_emails: ""
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
Emails will be forwarded to the configured address instead of the original
|
|
351
|
+
recipient.
|
|
352
|
+
|
|
353
|
+
### Rate Limiting
|
|
354
|
+
|
|
355
|
+
Rate limiting is disabled in development by default. To enable:
|
|
356
|
+
|
|
357
|
+
1. Set `RATE_LIMIT_ENGINE_ENABLED=true` in your environment
|
|
358
|
+
2. Set the org's hourly limit:
|
|
359
|
+
|
|
360
|
+
```ruby
|
|
361
|
+
Organization.first.update!(max_hourly_emails: 5)
|
|
362
|
+
```
|
|
363
|
+
|
|
364
|
+
3. Send more emails than the limit to trigger throttling
|
|
365
|
+
|
|
366
|
+
### Email Logging
|
|
367
|
+
|
|
368
|
+
1. Enable logging in `config/constants.yml`:
|
|
369
|
+
|
|
370
|
+
```yaml
|
|
371
|
+
development:
|
|
372
|
+
email_pipeline:
|
|
373
|
+
email_logging_enabled: true
|
|
374
|
+
retention_days: 30
|
|
375
|
+
```
|
|
376
|
+
|
|
377
|
+
2. Restart Sidekiq (the engine registers interceptors/observers at boot)
|
|
378
|
+
|
|
379
|
+
3. Send an email from the app and check the Email Logs page in admin panel
|
|
380
|
+
|
|
381
|
+
### SparkPost Webhooks (Local)
|
|
382
|
+
|
|
383
|
+
To test webhooks locally, use a tunneling service:
|
|
384
|
+
|
|
385
|
+
1. Start a tunnel to your local server (e.g., `tunn.dev`, `ngrok`)
|
|
386
|
+
2. Use the tunnel URL as the webhook target in SparkPost
|
|
387
|
+
3. Add webhook credentials to `config/secrets.yml`:
|
|
388
|
+
|
|
389
|
+
```yaml
|
|
390
|
+
development:
|
|
391
|
+
email_pipeline:
|
|
392
|
+
sparkpost_webhook_username: "your-username"
|
|
393
|
+
sparkpost_webhook_password: "your-password"
|
|
103
394
|
```
|
|
104
395
|
|
|
396
|
+
4. Use a subdomain that maps to a valid organization (e.g., `spinkart.tunn.dev`)
|
|
397
|
+
|
|
398
|
+
### To send actual emails from your local, add the following lines to your development.rb
|
|
399
|
+
|
|
400
|
+
```ruby
|
|
401
|
+
config.action_mailer.delivery_method = :smtp
|
|
402
|
+
config.action_mailer.perform_deliveries = true
|
|
403
|
+
config.action_mailer.raise_delivery_errors = true
|
|
404
|
+
```
|
|
405
|
+
|
|
406
|
+
You will also need to add the following env variables:
|
|
407
|
+
|
|
408
|
+
```ruby
|
|
409
|
+
SPARKPOST_USERNAME=xxx
|
|
410
|
+
SPARKPOST_PASSWORD=xxx
|
|
411
|
+
SPARKPOST_DOMAIN=xxx # a verified Sparkpost domain. Unverified domains will raise errors.
|
|
412
|
+
```
|
|
413
|
+
|
|
105
414
|
## Instructions for Publishing
|
|
106
415
|
|
|
107
416
|
Consult the
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"handedOver": "تم تسليمه",
|
|
25
25
|
"queued": "معلق",
|
|
26
26
|
"failed": "فشل",
|
|
27
|
-
"spamComplaint": "
|
|
27
|
+
"spamComplaint": "تم وضع علامة كرسالة غير مرغوب فيها"
|
|
28
28
|
},
|
|
29
29
|
"filters": {
|
|
30
30
|
"recipient": "المستلم",
|
|
@@ -44,8 +44,13 @@
|
|
|
44
44
|
"failed": "فشل",
|
|
45
45
|
"emailBody": "محتوى البريد الإلكتروني",
|
|
46
46
|
"loadingBody": "جارٍ تحميل محتوى البريد الإلكتروني...",
|
|
47
|
-
"noBody": "محتوى البريد الإلكتروني غير متوفر."
|
|
48
|
-
|
|
47
|
+
"noBody": "محتوى البريد الإلكتروني غير متوفر.",
|
|
48
|
+
"rateLimited": "محدودية المعدل",
|
|
49
|
+
"dropped": "تم إسقاطه",
|
|
50
|
+
"markedAsSpam": "تم وضع علامة كرسالة غير مرغوب فيها"
|
|
51
|
+
},
|
|
52
|
+
"helpDescription": "تتبع كل رسالة إلكترونية صادرة من حسابك. مراقبة حالات التسليم وفهم سبب إسقاط الرسائل الإلكترونية أو تأخيرها أو ارتدادها.",
|
|
53
|
+
"debugDeliverability": "تحليل قابلية التسليم"
|
|
49
54
|
}
|
|
50
55
|
}
|
|
51
56
|
}
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"handedOver": "Предаден",
|
|
25
25
|
"queued": "В опашка",
|
|
26
26
|
"failed": "Неуспешен",
|
|
27
|
-
"spamComplaint": "
|
|
27
|
+
"spamComplaint": "Означен като спам"
|
|
28
28
|
},
|
|
29
29
|
"filters": {
|
|
30
30
|
"recipient": "Получател",
|
|
@@ -44,8 +44,13 @@
|
|
|
44
44
|
"failed": "Неуспешен",
|
|
45
45
|
"emailBody": "Съдържание на имейла",
|
|
46
46
|
"loadingBody": "Зареждане на съдържанието на имейла...",
|
|
47
|
-
"noBody": "Съдържанието на имейла не е налично."
|
|
48
|
-
|
|
47
|
+
"noBody": "Съдържанието на имейла не е налично.",
|
|
48
|
+
"rateLimited": "Ограничена честота",
|
|
49
|
+
"dropped": "Отхвърлен",
|
|
50
|
+
"markedAsSpam": "Означен като спам"
|
|
51
|
+
},
|
|
52
|
+
"helpDescription": "Проследявайте всяко изходящо имейл съобщение, изпратено от вашия акаунт. Наблюдавайте състоянията на доставката и разберете защо имейлите са били отхвърлени, върнати или забавени.",
|
|
53
|
+
"debugDeliverability": "Отстраняване на проблеми с доставяемостта"
|
|
49
54
|
}
|
|
50
55
|
}
|
|
51
56
|
}
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"handedOver": "Entregat",
|
|
25
25
|
"queued": "En cua",
|
|
26
26
|
"failed": "Fallit",
|
|
27
|
-
"spamComplaint": "
|
|
27
|
+
"spamComplaint": "Marcat com a spam"
|
|
28
28
|
},
|
|
29
29
|
"filters": {
|
|
30
30
|
"recipient": "Destinatari",
|
|
@@ -44,8 +44,13 @@
|
|
|
44
44
|
"failed": "Fallit",
|
|
45
45
|
"emailBody": "Cos del correu electrònic",
|
|
46
46
|
"loadingBody": "Carregant el contingut del correu electrònic...",
|
|
47
|
-
"noBody": "El contingut del correu electrònic no està disponible."
|
|
48
|
-
|
|
47
|
+
"noBody": "El contingut del correu electrònic no està disponible.",
|
|
48
|
+
"rateLimited": "Limitat per taxa",
|
|
49
|
+
"dropped": "Eliminar",
|
|
50
|
+
"markedAsSpam": "Marcat com a spam"
|
|
51
|
+
},
|
|
52
|
+
"helpDescription": "Rastreja cada correu electrònic sortint enviat des del teu compte. Controla els estats de lliurament i entén per què els correus electrònics han estat rebutjats, retornats o endarrerits.",
|
|
53
|
+
"debugDeliverability": "Depurar la lliurabilitat"
|
|
49
54
|
}
|
|
50
55
|
}
|
|
51
56
|
}
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"handedOver": "Předáno",
|
|
25
25
|
"queued": "Ve frontě",
|
|
26
26
|
"failed": "Nepodařilo se",
|
|
27
|
-
"spamComplaint": "
|
|
27
|
+
"spamComplaint": "Označeno jako spam"
|
|
28
28
|
},
|
|
29
29
|
"filters": {
|
|
30
30
|
"recipient": "Příjemce",
|
|
@@ -44,8 +44,13 @@
|
|
|
44
44
|
"failed": "Nepodařilo se",
|
|
45
45
|
"emailBody": "Tělo e-mailu",
|
|
46
46
|
"loadingBody": "Načítám obsah e-mailu...",
|
|
47
|
-
"noBody": "Obsah e-mailu není k dispozici."
|
|
48
|
-
|
|
47
|
+
"noBody": "Obsah e-mailu není k dispozici.",
|
|
48
|
+
"rateLimited": "Omezeno",
|
|
49
|
+
"dropped": "Zamítnuto",
|
|
50
|
+
"markedAsSpam": "Označeno jako spam"
|
|
51
|
+
},
|
|
52
|
+
"helpDescription": "Sledujte každý odchozí e-mail odeslaný z vašeho účtu. Monitorujte statusy doručení a pochopte, proč byly e-maily zamítnuty, vráceny nebo zpožděny.",
|
|
53
|
+
"debugDeliverability": "Debugger doručitelnosti"
|
|
49
54
|
}
|
|
50
55
|
}
|
|
51
56
|
}
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"handedOver": "Overgivet",
|
|
25
25
|
"queued": "I kø",
|
|
26
26
|
"failed": "Fejlet",
|
|
27
|
-
"spamComplaint": "
|
|
27
|
+
"spamComplaint": "Markeret som spam"
|
|
28
28
|
},
|
|
29
29
|
"filters": {
|
|
30
30
|
"recipient": "Modtager",
|
|
@@ -44,8 +44,13 @@
|
|
|
44
44
|
"failed": "Fejlet",
|
|
45
45
|
"emailBody": "E-mail indhold",
|
|
46
46
|
"loadingBody": "Indlæser e-mail indhold...",
|
|
47
|
-
"noBody": "E-mail indhold er ikke tilgængeligt."
|
|
48
|
-
|
|
47
|
+
"noBody": "E-mail indhold er ikke tilgængeligt.",
|
|
48
|
+
"rateLimited": "Hastighedsbegrænset",
|
|
49
|
+
"dropped": "Droppet",
|
|
50
|
+
"markedAsSpam": "Markeret som spam"
|
|
51
|
+
},
|
|
52
|
+
"helpDescription": "Spor hver udgående e-mail, der sendes fra din konto. Overvåg leveringsstatuser og forstå, hvorfor e-mails blev droppet, tilbagevist eller forsinket.",
|
|
53
|
+
"debugDeliverability": "Fejlret leverbarhed"
|
|
49
54
|
}
|
|
50
55
|
}
|
|
51
56
|
}
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"handedOver": "Übergeben",
|
|
25
25
|
"queued": "In der Warteschlange",
|
|
26
26
|
"failed": "Fehlgeschlagen",
|
|
27
|
-
"spamComplaint": "Spam
|
|
27
|
+
"spamComplaint": "Als Spam markiert"
|
|
28
28
|
},
|
|
29
29
|
"filters": {
|
|
30
30
|
"recipient": "Empfänger",
|
|
@@ -44,8 +44,13 @@
|
|
|
44
44
|
"failed": "Fehlgeschlagen",
|
|
45
45
|
"emailBody": "E-Mail-Inhalt",
|
|
46
46
|
"loadingBody": "Lade E-Mail-Inhalt...",
|
|
47
|
-
"noBody": "E-Mail-Inhalt ist nicht verfügbar."
|
|
48
|
-
|
|
47
|
+
"noBody": "E-Mail-Inhalt ist nicht verfügbar.",
|
|
48
|
+
"rateLimited": "Rate Limitiert",
|
|
49
|
+
"dropped": "Abgelehnt",
|
|
50
|
+
"markedAsSpam": "Als Spam markiert"
|
|
51
|
+
},
|
|
52
|
+
"helpDescription": "Verfolgen Sie jede ausgehende E-Mail, die von Ihrem Konto gesendet wurde. Überwachen Sie den Zustellstatus und verstehen Sie, warum E-Mails zurückgewiesen, abgelehnt oder verzögert wurden.",
|
|
53
|
+
"debugDeliverability": "Lieferbarkeit debuggen"
|
|
49
54
|
}
|
|
50
55
|
}
|
|
51
56
|
}
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"handedOver": "Entregado",
|
|
25
25
|
"queued": "En cola",
|
|
26
26
|
"failed": "Fallido",
|
|
27
|
-
"spamComplaint": "
|
|
27
|
+
"spamComplaint": "Marcado como spam"
|
|
28
28
|
},
|
|
29
29
|
"filters": {
|
|
30
30
|
"recipient": "Destinatario",
|
|
@@ -44,8 +44,13 @@
|
|
|
44
44
|
"failed": "Fallido",
|
|
45
45
|
"emailBody": "Cuerpo del correo electrónico",
|
|
46
46
|
"loadingBody": "Cargando contenido del correo electrónico...",
|
|
47
|
-
"noBody": "El contenido del correo electrónico no está disponible."
|
|
48
|
-
|
|
47
|
+
"noBody": "El contenido del correo electrónico no está disponible.",
|
|
48
|
+
"rateLimited": "Limitado por tasa",
|
|
49
|
+
"dropped": "Descartado",
|
|
50
|
+
"markedAsSpam": "Marcado como spam"
|
|
51
|
+
},
|
|
52
|
+
"helpDescription": "Realiza un seguimiento de cada correo electrónico saliente enviado desde tu cuenta. Monitorea los estados de entrega y entiende por qué los correos electrónicos fueron descartados, rebotados o retrasados.",
|
|
53
|
+
"debugDeliverability": "Depurar entregabilidad"
|
|
49
54
|
}
|
|
50
55
|
}
|
|
51
56
|
}
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"handedOver": "Entregado",
|
|
25
25
|
"queued": "En cola",
|
|
26
26
|
"failed": "Fallido",
|
|
27
|
-
"spamComplaint": "
|
|
27
|
+
"spamComplaint": "Marcado como spam"
|
|
28
28
|
},
|
|
29
29
|
"filters": {
|
|
30
30
|
"recipient": "Destinatario",
|
|
@@ -44,8 +44,13 @@
|
|
|
44
44
|
"failed": "Fallido",
|
|
45
45
|
"emailBody": "Cuerpo del correo electrónico",
|
|
46
46
|
"loadingBody": "Cargando contenido del correo electrónico...",
|
|
47
|
-
"noBody": "El contenido del correo electrónico no está disponible."
|
|
48
|
-
|
|
47
|
+
"noBody": "El contenido del correo electrónico no está disponible.",
|
|
48
|
+
"rateLimited": "Limitado por tasa",
|
|
49
|
+
"dropped": "Rechazado",
|
|
50
|
+
"markedAsSpam": "Marcado como spam"
|
|
51
|
+
},
|
|
52
|
+
"helpDescription": "Realiza un seguimiento de cada correo electrónico saliente enviado desde tu cuenta. Monitorea los estados de entrega y comprende por qué los correos electrónicos fueron rechazados, rebotados o retrasados.",
|
|
53
|
+
"debugDeliverability": "Depurar la entregabilidad"
|
|
49
54
|
}
|
|
50
55
|
}
|
|
51
56
|
}
|