fix(api): avoid NRE in MailSender on rdv query notifications

The API did not bind the Smtp section and its appsettings lacked
Site.Owner, so MailSender threw a NullReferenceException and
PostQuery returned 500. Bind Smtp in the API, add Owner/Smtp to the
api appsettings template, and log/skip sending when mail
configuration is incomplete.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Paul Schneider 2026-10-21 12:20:38 +01:00
commit 0e9f61bd24
Signed by: notazof
GPG key ID: AD4B9B545FBD7D12
5 changed files with 52 additions and 2 deletions

View file

@ -6,7 +6,17 @@
"https://preprod-blogs.$DOMAIN"
],
"Bills": "bills",
"TempDir": "temp"
"TempDir": "temp",
"Owner": {
"Name": "Paul Schneider",
"EMail": "paul@pschneider.fr"
}
},
"Smtp": {
"Host": "mercure.pschneider.fr",
"Port": 465,
"UserName": "paul",
"Password": "$SMTP_PASSWORD"
},
"Logging": {
"LogLevel": {