Contact: mail via achtergrondservice met claim, backoff en maximum (CMS-U5)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-10 15:28:24 +01:00
co-authored by Claude Sonnet 5.5
parent 728fc08db8
commit bc7936034c
28 changed files with 1273 additions and 107 deletions
@@ -44,7 +44,10 @@ public class ContactModule : IModule
services.AddScoped<IContactSubmissionService, ContactSubmissionService>();
services.AddSingleton<IContactTokenService, ContactTokenService>();
services.AddSingleton<ICaptchaVerifier, NullCaptchaVerifier>();
services.AddScoped<IContactMailSender, NoOpContactMailSender>();
// Mail: the request only stores and signals; the background service sends (and retries) with the host's mail pieces.
services.AddScoped<IContactMailSender, ContactMailSender>();
services.AddSingleton<IContactMailSignal, ContactMailSignal>();
services.AddHostedService<ContactMailService>();
// Gate: the form is open only if the host switch AND the CMS switch are on. The host switch
// is asked first, so with it off the database is never touched.
services.AddSingleton<ContactSettingsCache>();