Halve of foute mailconfiguratie: host start, mail uit, een duidelijke Error-logregel

Eén bron (IMailAvailability) bepaalt of mail aan staat: SMTP-host gezet EN de hele mailconfiguratie geldig.
Anders start de host gewoon, gebruikt de Null-verzender, meldt emailEnabled=false en logt eenmalig
mail_configuration_invalid met de namen van de ontbrekende of ongeldige instellingen (nooit waarden of
geheimen). Getest: halve config, elke soort fout, geen geheim in het log, volledige config werkt als
voorheen, geen mailinstelling geeft geen enkele waarschuwing, alle verbruikers zien mail als uit.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-08 20:51:41 +01:00
co-authored by Claude Sonnet 5.5
parent 142815a3ab
commit bd9790819d
12 changed files with 308 additions and 40 deletions
@@ -39,6 +39,7 @@ public class IdentityMailServiceTests
Options.Create(new AppMailOptions { DefaultLanguage = defaultLanguage, PublicBaseUrl = "https://test.andreaslop.nl/" }),
Options.Create(new InvitationSettings { ExpiryHours = hours }),
Options.Create(new SlpModularCms.Core.Identity.Services.PasswordResetSettings()),
new FixedAvailability(!string.IsNullOrWhiteSpace(smtpHost)),
NullLogger<IdentityMailService>.Instance);
[Fact]