feat: provide clear errors for missing required envs
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Simon 2026-03-23 12:55:05 +01:00
parent f8a3cc4c47
commit 61952f986d
Signed by: simon
GPG key ID: 40E7A58C4AA1EDB2
6 changed files with 146 additions and 27 deletions

View file

@ -42,6 +42,8 @@ When an ENV variable is set, the corresponding Settings field is read-only in th
| Sender name | `MAIL_FROM_NAME` | `smtp_from_name` | Display name in "From" header (default: Mila)|
| Sender email | `MAIL_FROM_EMAIL` | `smtp_from_email` | Address in "From" header; must match SMTP user on most servers |
**Boot-time ENV handling:** In `config/runtime.exs`, if `SMTP_PORT` is set but empty or invalid, it is treated as unset and default 587 is used. This avoids startup crashes (e.g. `ArgumentError` from `String.to_integer("")`) when variables are misconfigured in deployment.
**Important:** On most SMTP servers (e.g. Postfix with strict relay policies) the sender email (`smtp_from_email`) must be the same address as `smtp_username` or an alias that is owned by that account.
**Settings UI:** The form uses three rows on wide viewports: host, port, TLS/SSL | username, password | sender email, sender name. Content width is limited by the global settings wrapper (see `DESIGN_GUIDELINES.md` §6.4).