feat: consume transactional email notifications

Add contract validation, SMTP delivery results, terminal failure context, neutral development seeding, and local Docker setup.

Ref: IT-1033
This commit is contained in:
2026-08-04 12:32:28 +03:00
parent b8435ac07b
commit 2757869176
37 changed files with 1465 additions and 122 deletions
@@ -18,11 +18,15 @@ internal sealed class EmailTemplateService : IEmailTemplateService
string? languageCode,
CancellationToken cancellationToken)
{
var lang = string.IsNullOrWhiteSpace(languageCode) ? "en" : languageCode;
var template = await _templateRepository.GetAsync(serviceName, templateKey, lang, cancellationToken);
if (string.IsNullOrWhiteSpace(languageCode))
throw new InvalidDataException("LanguageCode is required.");
if (template is null && lang != "en")
template = await _templateRepository.GetAsync(serviceName, templateKey, "en", cancellationToken);
string lang = languageCode.Trim().ToLowerInvariant();
EmailTemplate? template = await _templateRepository.GetAsync(
serviceName,
templateKey,
lang,
cancellationToken);
return template
?? throw new InvalidOperationException(