- 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]>
- M-1: the save rule of `emailMethod` ran after the early return for the plugin's status writes, so the first
failed (or recovered) send stored the method the read showed as if an admin had chosen it. The rule is now a
hook of its own that runs on every write: a write that does not name the method leaves what is stored, empty
included.
- M-2: a sent value that is not null or one of the three methods (a number, a list, another word) is refused
with a ValidationError (400) before it reaches the database.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
What is chosen is what is used. The choice is the stored field `emailMethod` of Site integrations (empty until
somebody chooses); `emailTransport` of 1.6 - 1.17.0 stays, hidden.
- no silent switch: a chosen method that cannot be used (SMTP incomplete, Graph without GRAPH_*) fails loudly
- status smtp-incomplete / graph-not-set-up, state block, doctor mail-method - and nothing is sent another way
- upgrade writes nothing and loses no mail: until somebody chooses, the order of 1.17.0 applies and the field
shows its result as selected; the first save of the panel's form stores the choice
- only the chosen method's fields are shown; the test e-mail names the method (Graph too)
- mail: { relay: false } does not offer "IWSN" (the stored values stay three: one SQL enum for every project)
- Postgres / SQLite: one migration (a column). Before it runs the plugin's readers read the global without the
field, mail goes the old way, one loud log line and the doctor say what to do
- getMailMethod, setMailMethod, resolveMailMethod, readMailSettings, mailMethodColumnMissing exported
- tests on SQLite, Postgres and MongoDB, with and without the migration; docs, AGENT.md, skills, changelog
Co-Authored-By: Claude Fable 5.2 <[email protected]>