Docs: admin languages and texts, wording rule for agents, new screen names
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
6b46bc0c14
commit
0a2374db18
+10
-10
@@ -17,7 +17,7 @@ install it. Graph is plain `fetch`, no extra packages.
|
||||
|
||||
No plugin options — SMTP (`smtpHost`, `smtpPort` (default 587), `smtpUser`,
|
||||
`smtpPassword`, `smtpFromAddress`, `smtpFromName`) and `emailTransport` live in
|
||||
SiteIntegrations (SMTP tab). The editor configures them in the panel. The plugin does **not** set
|
||||
SiteIntegrations (E-mail sending tab). The editor configures them in the panel. The plugin does **not** set
|
||||
`config.email` — you wire the adapter yourself (below).
|
||||
|
||||
## Front — sendEmail (server)
|
||||
@@ -41,7 +41,7 @@ if (result.sent) {
|
||||
```
|
||||
|
||||
- Always the SMTP from the panel (not Graph, not `mailAdapter`); without `smtpHost`/`smtpUser`/`smtpPassword`
|
||||
→ `{ sent: false, error: 'SMTP is not configured in Site Integrations.' }`.
|
||||
→ `{ sent: false, error: 'SMTP is not configured in Site integrations.' }`.
|
||||
- `from` overrides the address (the name still comes from `smtpFromName`); without `from` and without
|
||||
`smtpFromAddress` → `{ sent: false, error: 'No from-address configured.' }`.
|
||||
- **The HTML is your argument** — the plugin has no templates, it sends what you pass.
|
||||
@@ -95,7 +95,7 @@ mail will not go out.
|
||||
|
||||
## Masking secrets in the panel (MaskedField)
|
||||
|
||||
Sensitive fields in Site Integrations (`smtpPassword`, `turnstileSecretKey`) are
|
||||
Sensitive fields in Site integrations (`smtpPassword`, `turnstileSecretKey`) are
|
||||
masked in the UI — they show `••••` instead of plaintext, with
|
||||
a Reveal/Hide button. This is UI masking, NOT hashing or encryption:
|
||||
the value in the database is plaintext (it must be recoverable for SMTP / Turnstile authentication).
|
||||
@@ -144,7 +144,7 @@ import { mailAdapter } from '@intecion/ipal-kit'
|
||||
email: mailAdapter(), // SMTP or Graph — chosen in the panel, on EVERY send
|
||||
```
|
||||
|
||||
`mailAdapter` is a dispatcher: it reads `emailTransport` from Site Integrations on every
|
||||
`mailAdapter` is a dispatcher: it reads `emailTransport` from Site integrations on every
|
||||
send (no value → `'smtp'`), so the switch in the panel works without a restart.
|
||||
Graph only when all 4 `GRAPH_*` variables are in env — otherwise a clear log and
|
||||
fallback to SMTP (mail is not lost silently).
|
||||
@@ -197,13 +197,13 @@ import { mailAdapter } from '@intecion/ipal-kit'
|
||||
email: mailAdapter()
|
||||
```
|
||||
|
||||
Panel → Site Integrations → SMTP → **Email Transport** (SMTP / Microsoft Graph).
|
||||
Panel → Site integrations → SMTP → **Email Transport** (SMTP / Microsoft Graph).
|
||||
The dispatcher reads this choice per send. Guard: if Graph is selected but the
|
||||
secrets are missing in .env → log + fallback to SMTP (no silent failure).
|
||||
|
||||
## Test send — button in the panel
|
||||
|
||||
The SMTP tab has a **Send test** button: enter an address, click, and a test
|
||||
The E-mail sending tab has a **Send test** button: enter an address, click, and a test
|
||||
mail goes out through the CURRENT transport (`payload.sendEmail`). It shows the result (✓/✗ with the error). Endpoint
|
||||
`POST /api/ipal/test-email`, body `{ to }` (`admin` role only — needs roles from the `access` option:
|
||||
not logged in → 401, other role → 403, bad address → 400, failed send → 502).
|
||||
@@ -216,10 +216,10 @@ Save your changes before the test — the endpoint reads from the database, not
|
||||
|
||||
## Send status in the panel
|
||||
|
||||
`mailAdapter()` stores the send result in Site Integrations (at most once per 10 min
|
||||
`mailAdapter()` stores the send result in Site integrations (at most once per 10 min
|
||||
while an error persists, immediately when the state changes). When sending fails:
|
||||
- **Dashboard** — a red alert with the cause and a link to Site Integrations,
|
||||
- **Site Integrations → SMTP** — a banner with the error (e.g. `SMTP: connect ECONNREFUSED …`,
|
||||
- **Dashboard** — a red alert with the cause and a link to Site integrations,
|
||||
- **Site integrations → SMTP** — a banner with the error (e.g. `SMTP: connect ECONNREFUSED …`,
|
||||
`SMTP: SMTP is not configured…`, `SMTP: Invalid login: 535 …`,
|
||||
`Microsoft Graph: Graph sendMail failed (403).`) and the time.
|
||||
|
||||
@@ -234,7 +234,7 @@ send (e.g. **Send test**) the current one appears.
|
||||
## Turn off, override, extend
|
||||
|
||||
- **Turn off:** the plugin does not set `config.email` itself — without `email:` in `buildConfig` Payload uses
|
||||
its mock (mail only in the console). The SMTP fields in Site Integrations and the endpoint
|
||||
its mock (mail only in the console). The SMTP fields in Site integrations and the endpoint
|
||||
`POST /api/ipal/test-email` are currently always added.
|
||||
- **Choosing the transport:** `mailAdapter()` (the panel decides) or a fixed `panelSmtpAdapter()` /
|
||||
`graphAdapter()`; any other Payload adapter (e.g. `@payloadcms/email-nodemailer`) also works —
|
||||
|
||||
Reference in New Issue
Block a user