Sending method, the owner's answers: nothing changes until another option is picked; the panel warns before the save
- a save that sends the method already shown, while nothing is stored, stores nothing: the site keeps sending exactly as before and keeps following what is filled in, until somebody picks ANOTHER option - the state block reads the form as it is edited and warns at once when "Own SMTP server" is picked with server, user name or password empty, or "Microsoft Graph" on a server without GRAPH_* (graphReady in the panel state); it reloads after every save - texts, doctor's info finding, docs, skills, changelog; reference e2e checks the warning Co-Authored-By: Claude Fable 5.2 <[email protected]>
This commit is contained in:
co-authored by
Claude Fable 5.2
parent
8c19391590
commit
dc3e594d38
+4
-3
@@ -51,11 +51,12 @@ once there are more than 20.
|
||||
> **5. E-mail — nothing to do, one thing to know.** "Sending method" in Site integrations → E-mail sending is a
|
||||
> choice again: IWSN (built-in), Own SMTP server, Microsoft Graph (deprecated). **Upgrading writes nothing and
|
||||
> loses no mail:** the field shows the method the site sends through today as selected (no SMTP server → IWSN; an
|
||||
> SMTP server → Own SMTP server; `GRAPH_*` → Microsoft Graph), and the site keeps sending that way. **The first save
|
||||
> of Site integrations stores that choice; from then on the site sends that way only.** If the chosen method cannot
|
||||
> SMTP server → Own SMTP server; `GRAPH_*` → Microsoft Graph), and the site keeps sending that way. **Nothing changes
|
||||
> until somebody picks another option:** saving the page with the method shown stores no choice. A different option
|
||||
> picked and saved is stored, and from then on the site sends that way only.** If the chosen method cannot
|
||||
> be used — "Own SMTP server" without server, user name and password, "Microsoft Graph" on a server without
|
||||
> `GRAPH_*` — e-mails **fail and the panel says so; they are not sent another way** (in 1.17.0 they would have gone
|
||||
> through SMTP or IWSN). So after the upgrade: open the tab, check that the method shown is the one meant, save.
|
||||
> through SMTP or IWSN). The panel warns while the option is being picked, before the save.
|
||||
> **Postgres / SQLite projects: create and apply one migration** (`pnpm payload migrate:create`; the new field
|
||||
> `emailMethod` is a column) in the same deploy. Without it the site still sends its mail the old way and one loud
|
||||
> log line says so, but the Site integrations page of the panel does not open. MongoDB: nothing.
|
||||
|
||||
+4
-2
@@ -1298,14 +1298,16 @@ one migration** (`pnpm payload migrate:create`, applied at container start); bef
|
||||
old way, the Site integrations page does not open, and `iapl-doctor --deep` reports `mail-method` (error). Until somebody chooses (an upgraded site, a new site) the order of 1.17.0 applies and the field shows
|
||||
its result as selected (`resolveMailTransport`, type `MailTransport`): Graph when `emailTransport` is `graph` and
|
||||
`GRAPH_*` is set → SMTP when server, user name and password are filled in → Graph when `GRAPH_*` is set → the mail
|
||||
service → nothing. The first save of Site integrations stores the choice. From code: `getMailMethod`,
|
||||
service → nothing. Saving with the method shown stores no choice: only picking another option does (the owner's
|
||||
rule: nothing changes until somebody picks another option); `setMailMethod` fixes it from code. The state block warns
|
||||
while an unusable option is picked, before the save. From code: `getMailMethod`,
|
||||
`setMailMethod(payload, 'relay' | 'smtp' | 'graph' | null)`, `resolveMailMethod` (`ResolvedMailMethod`,
|
||||
`MailMethodProblem`), `MailMethod`, `MAIL_METHODS`, `isMailMethod`, `readMailSettings` / `STORED_MAIL_METHOD_CONTEXT`
|
||||
(a read with the value as stored — an ordinary read shows the method in effect), `mailMethodColumnMissing`; or
|
||||
`updateGlobal` with `emailMethod`. Seeds that
|
||||
set up mail write `emailMethod`, not `emailTransport`. **Verify:** the state block names the method; **Send test
|
||||
e-mail** answers "through IWSN" / "through your SMTP server" / "through Microsoft Graph"; `iapl-doctor --deep`
|
||||
reports no `mail-method` finding after the first save. `mail: { relay: false }` removes the option "IWSN".
|
||||
reports `mail-method` info (nothing picked yet) or nothing (picked and usable). `mail: { relay: false }` removes the option "IWSN".
|
||||
|
||||
**What the site needs for the mail service** — check each one:
|
||||
|
||||
|
||||
@@ -102,7 +102,7 @@ through this procedure. Ask only when you are missing something you cannot get y
|
||||
| emails are not sent | no `email: mailAdapter()` / empty Emails tab of the form / the transport fails | Site integrations → E-mail sending: read the block "How e-mails are sent" and the banner's code, then **Send test e-mail**; rows below; email.md |
|
||||
| e-mails are not sent; state block: "Your SMTP server is chosen, but its settings are incomplete" / "Microsoft Graph is chosen, but it is not set up on this server" (status `smtp-incomplete` / `graph-not-set-up`, doctor `mail-method` error) | the chosen "Sending method" cannot be used, and since 1.17.1 nothing is sent another way | fill in server, user name and password / set the `GRAPH_*` variables — or choose another method (IWSN needs nothing) and save |
|
||||
| Site integrations does not open after the upgrade to 1.17.1 (Postgres / SQLite); log: "the column for \"emailMethod\" … is missing"; doctor `mail-method` error | the migration that adds the column has not run (mail still leaves the old way) | `pnpm payload migrate:create`, commit, apply at container start |
|
||||
| the site switched how it sends after a field or a variable changed | nobody has chosen the "Sending method" yet (doctor `mail-method` info): the site still picks by the order of 1.17.0 | Site integrations → E-mail sending: check the method shown, save |
|
||||
| the site switched how it sends after a field or a variable changed | nobody has chosen the "Sending method" yet (doctor `mail-method` info): the site still picks by the order of 1.17.0 | nothing, if that is wanted (the owner's rule: no change until another option is picked); to fix it: pick the method (another option, then this one) or `setMailMethod(payload, '<method>')` |
|
||||
| state block: "Not connected yet" on the production domain | no e-mail was sent yet | **Send test e-mail** (the site enrols on its first send) or "Connect again" |
|
||||
| `relay-refused` / "The mail service could not reach this site at …" (cause `callback-failed`) | `unreachable` / `timeout`: firewall, private network, wrong public host in `serverURL`; `redirect`: `trailingSlash: true`, apex → `www`, a language redirect; `status`: route blocked, missing (`mail: { relay: false }`?) or another `routes.api`; `confirmation`: a proxy rewrites the answer | `curl -i -X POST https://<host>/api/iapl/mail-relay/confirm -d '{}' -H 'content-type: application/json'` must answer **404 with an empty body, no redirect**; fix `serverURL` / `mail.relay.host`, or ask Intecion to set the site's confirm address (path ending in `/confirm/` with trailing slashes); then "Connect again" (the site does not retry by itself for 15 min). email.md "When the site cannot be confirmed" |
|
||||
| `relay-refused`, cause `host-not-allowed` / "This site has no public address yet" | the site runs on `localhost`, a private name, or `serverURL` is empty | expected in development (use SMTP / Mailpit there); in production set `serverURL` |
|
||||
|
||||
@@ -661,7 +661,7 @@ scaling (5). `●` routes for pages need the database at build time (PROGRAMISTA
|
||||
6. **Notifications**: form messages in every language.
|
||||
7. **Site integrations → E-mail sending**: "Sender name" (the client's name; empty = the site name) and **"Sender
|
||||
address"** (the client's address: with the mail service replies go there). "Sending method" stays **IWSN (built-in)**; choose **Own SMTP server** and fill in its fields **only** when the client asked
|
||||
for its own server — what is chosen is what is used, an incomplete SMTP server sends nothing. Save the tab once so the choice is stored. On the production domain: the block "How e-mails are sent" must say "Connected to IWSN" ("waiting for approval": while the service runs with enrolment "pending" (from its launch until Intecion switches to open enrolment), every new site waits for approval — ask Intecion to approve the host; under open enrolment it is the exception; the real domain enrols by itself at launch although the site was connected on its development address — nothing to press; "The data comes from another site" = the site is non-public (its host matches `developmentHosts`, built in `*.dev.netscale.pl`, or `IAPL_NOINDEX=1`) and holds a copy of another site's data: press "Connect again" only if the copy should send — on the production domain it means `IAPL_NOINDEX` was left set. A development address under `*.dev.netscale.pl` needs nothing; a staging or test copy on any other host must have its host in `iapl({ developmentHosts: […] })` (an array of host patterns: a single string, an empty entry or a lone `*` stops the start) or `IAPL_NOINDEX=1`, or it mails the real addresses in its data), then **Send test e-mail** → "through IWSN". Turnstile (for testing site
|
||||
for its own server — what is chosen is what is used, an incomplete SMTP server sends nothing. A new site sends through IWSN with nothing picked; picking another option and saving stores it (the panel warns before the save when its settings are incomplete). On the production domain: the block "How e-mails are sent" must say "Connected to IWSN" ("waiting for approval": while the service runs with enrolment "pending" (from its launch until Intecion switches to open enrolment), every new site waits for approval — ask Intecion to approve the host; under open enrolment it is the exception; the real domain enrols by itself at launch although the site was connected on its development address — nothing to press; "The data comes from another site" = the site is non-public (its host matches `developmentHosts`, built in `*.dev.netscale.pl`, or `IAPL_NOINDEX=1`) and holds a copy of another site's data: press "Connect again" only if the copy should send — on the production domain it means `IAPL_NOINDEX` was left set. A development address under `*.dev.netscale.pl` needs nothing; a staging or test copy on any other host must have its host in `iapl({ developmentHosts: […] })` (an array of host patterns: a single string, an empty entry or a lone `*` stops the start) or `IAPL_NOINDEX=1`, or it mails the real addresses in its data), then **Send test e-mail** → "through IWSN". Turnstile (for testing site
|
||||
`1x00000000000000000000AA`, secret `1x0000000000000000000000000000000AA`; production keys from the client), analytics/pixel
|
||||
IDs, IndexNow → generate key. Mail/Turnstile errors show up as a dashboard alert.
|
||||
8. **Forms**: check the addresses in the Emails tab of the seeded forms.
|
||||
|
||||
@@ -679,8 +679,9 @@ PROGRAMISTA §6, items 73–75; email.md; AGENT.md §7.2) — nothing to run; re
|
||||
import-map change; `pnpm payload generate:types` gives a diff (the field `emailMethod`): run it and commit.
|
||||
2. After the deploy open Site integrations → E-mail sending. "Sending method" shows the method the site sends through
|
||||
today as selected: **IWSN (built-in)** (no SMTP server), **Own SMTP server**, or **Microsoft Graph (deprecated)**
|
||||
(`GRAPH_*` on the server). Check it is the one meant, **save**, send a test e-mail: the answer names the method.
|
||||
Until that save the site keeps the order of 1.17.0 and `iapl-doctor --deep` notes it (`mail-method`, info).
|
||||
(`GRAPH_*` on the server). Nothing to save: the site keeps sending exactly as before **until somebody picks another
|
||||
option** (saving with the shown method stores nothing); `iapl-doctor --deep` notes it (`mail-method`, info). Send a
|
||||
test e-mail: the answer names the method.
|
||||
3. From the save on what is chosen is what is used: "Own SMTP server" with an incomplete server, or "Microsoft Graph"
|
||||
without `GRAPH_*`, sends **nothing** and says so (state block, `mail-method` error) — no fallback to another method.
|
||||
Tell the owner before changing the method on a live site.
|
||||
|
||||
+12
-3
@@ -94,9 +94,18 @@ The method follows the order of 1.17.0, the field shows it **as selected**, and
|
||||
| half an SMTP set-up, no `GRAPH_*` | IWSN (built-in), with the hint "The SMTP settings below are incomplete" | through the service, as in 1.17.0 |
|
||||
| a new site | IWSN (built-in) | through the service |
|
||||
|
||||
**The first save of Site integrations stores what the form shows** (the form always sends the field), and from
|
||||
then on the method is fixed. The state block says "Nobody has chosen the sending method yet, so the site picked
|
||||
this one. Save this page to keep it." until then, and the doctor's deep run notes it (`mail-method`, info). A script
|
||||
**Nothing changes until somebody picks another option.** Saving Site integrations with the method shown stores no
|
||||
choice — the site keeps sending exactly as before and keeps following what is filled in, as in 1.17.0 (owner's rule,
|
||||
2026-11-26). Picking a **different** option and saving stores it; from then on the method is fixed (a save that keeps
|
||||
it keeps it). The state block says "The site sends the way it did before. It changes only when you pick another
|
||||
sending method." meanwhile, and the doctor's deep run notes it (`mail-method`, info). To fix the method shown without
|
||||
picking another, a script calls `setMailMethod(payload, 'relay')`.
|
||||
|
||||
**A warning before the save.** The state block reads the form as it is being edited: "Own SMTP server" picked with
|
||||
server, user name or password empty says "Fill in server, user name and password below. If you save without them,
|
||||
e-mails will not be sent."; "Microsoft Graph" picked on a server without `GRAPH_*` says the same for Graph. After the
|
||||
save the block reloads and shows the saved state (the error above, if it was saved anyway). Saving is not refused:
|
||||
an admin may set the method first and the server after. A script
|
||||
of before 1.17.1 that writes `emailTransport` alone still means what it meant: it puts the site back on the order
|
||||
above (write `emailMethod` to choose).
|
||||
|
||||
|
||||
Reference in New Issue
Block a user