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
Copy file name to clipboardExpand all lines: README.md
+39-29Lines changed: 39 additions & 29 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -60,14 +60,16 @@ SMTP_SECURE=false
60
60
SMTP_USER=notifications@example.com
61
61
SMTP_PASSWORD=change-me
62
62
SMTP_FROM=notifications@example.com
63
+
SMTP_POOL_MAX_CONNECTIONS=1
64
+
SMTP_POOL_MAX_MESSAGES=1000
63
65
EMAIL_MAX_RETRIES=5
64
66
```
65
67
66
-
`SMTP_SECURE=true` enables implicit TLS. Port `465` also enables it automatically. Failed sends are retried by the notification worker until `EMAIL_MAX_RETRIES` is reached.
68
+
`SMTP_SECURE=true` enables implicit TLS. Port `465` also enables it automatically. SMTP pooling reuses authenticated connections; one connection can send up to `SMTP_POOL_MAX_MESSAGES` messages before reconnecting. Failed sends are retried by the notification worker until `EMAIL_MAX_RETRIES` is reached.
67
69
68
-
Email HTML templates live in `config/templates/email/*.ejs`. Their i18next translations live in `config/templates/email/locales/<language>.json`; the recipient's saved language is used with `FALLBACKLANG` as fallback.
70
+
Notification registrations live in `config/notifications/*.js`. Email HTML templates live in `config/templates/email/*.ejs`. Core email translations live in `config/templates/email/locales/<language>.json`; feature translations can use `config/templates/email/locales/<featureName>/<language>.json`. The recipient's saved language is used with `FALLBACKLANG` as fallback.
69
71
70
-
Features can register additional queued email types while their startup module is loaded:
72
+
Notification definitions are channel-independent. Current channel is `email`; future channels can be added without changing notification callers. Definitions use category `system` or `newsletter`. Newsletter registrations automatically appear in user settings.
71
73
72
74
Place feature-owned templates inside the feature package:
The type is stored in `email_tasks.type`.`templatePath` may be absolute or relative to the application root. Copied template files are tracked in the feature manifest and removed by the feature uninstaller. Feature API modules are loaded before the email worker starts, so their registrations are available when queued tasks are processed.
113
+
The notification type is stored in `email_tasks.type`; the user preference channel is stored in `user_notifications.type`.`templatePath` may be absolute or relative to the application root. Copied registration, locale, and template files are tracked in the feature manifest and removed by the feature uninstaller. Notification config files are loaded before the email worker starts.
116
114
117
115
## OAuth Login
118
116
@@ -206,16 +204,28 @@ Each feature folder needs a `feature.json` or `config.json` manifest:
206
204
207
205
On startup the app scans `installed_features/<featureName>`. Folder presence enables the feature. If the feature version is newer than `config/features/<featureName>.json`, or if the installed config does not exist yet, the feature files are copied into the application.
208
206
209
-
Supported feature folders include application folders such as `api`, `lib`, `src`, `views`, `public`, and `config`. A top-level `templates` folder is installed into `config/templates`. Feature translations live in:
207
+
Supported feature folders include application folders such as `api`, `lib`, `src`, `views`, `public`, and `config`. A top-level `templates` folder is installed into `config/templates`. Feature page translations live in:
0 commit comments