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>
43 lines
992 B
JSON
43 lines
992 B
JSON
{
|
|
"Site": {
|
|
"Authority": "https://preprod-yavsc.$DOMAIN",
|
|
"Audience": ["api"],
|
|
"CorsAllowedOrigins": [
|
|
"https://preprod-blogs.$DOMAIN"
|
|
],
|
|
"Bills": "bills",
|
|
"TempDir": "temp",
|
|
"Owner": {
|
|
"Name": "Paul Schneider",
|
|
"EMail": "paul@pschneider.fr"
|
|
}
|
|
},
|
|
"Smtp": {
|
|
"Host": "mercure.pschneider.fr",
|
|
"Port": 465,
|
|
"UserName": "paul",
|
|
"Password": "$SMTP_PASSWORD"
|
|
},
|
|
"Logging": {
|
|
"LogLevel": {
|
|
"Default": "Information",
|
|
"Microsoft": "Warning",
|
|
"Microsoft.Hosting.Lifetime": "Information"
|
|
}
|
|
},
|
|
"Kestrel": {
|
|
"Endpoints": {
|
|
"Http": {
|
|
"Url": "http://localhost:92"
|
|
},
|
|
"Https": {
|
|
"Url": "https://localhost:93",
|
|
"Certificate": {
|
|
"Path": "/etc/letsencrypt/live/preprod-api.$DOMAIN/fullchain.pem",
|
|
"KeyPath": "/etc/letsencrypt/live/preprod-api.$DOMAIN/privkey.pem"
|
|
},
|
|
"Protocols": "Http1AndHttp2AndHttp3"
|
|
}
|
|
}
|
|
}
|
|
}
|