private async Task HandleFailedTransactionBroadcastAsync(SendBroadcastData <FailedTransactionData> result) { await _log.WriteInfoAsync("EmailRequestQueueConsumer", "HandleFailedTransactionBroadcastAsync", null, $"DT: {DateTime.UtcNow.ToIsoDateTime()}" + $"{Environment.NewLine}{result.ToJson()}"); var msg = _emailGenerator.GenerateFailedTransactionMsg(result.MessageData.TransactionId, result.MessageData.AffectedClientIds); await _smtpEmailSender.SendBroadcastAsync(result.BroadcastGroup, msg); }
private async Task HandleSwiftConfirmedBroadcastAsync(SendBroadcastData <SwiftConfirmedData> result) { await _log.WriteInfoAsync("EmailRequestQueueConsumer", "HandleSwiftConfirmedBroadcastAsync", null, $"DT: {DateTime.UtcNow.ToIsoDateTime()}" + $"{Environment.NewLine}{result.ToJson()}"); var msg = await _emailGenerator.GenerateSwiftConfirmedMsg(result.MessageData); await _smtpEmailSender.SendBroadcastAsync(result.BroadcastGroup, msg); }
private async Task HandleUserRegisteredBroadcastAsync(SendBroadcastData <UserRegisteredData> result) { await _log.WriteInfoAsync("EmailRequestQueueConsumer", "HandleUserRegisteredBroadcastAsync", null, $"DT: {DateTime.UtcNow.ToIsoDateTime()}" + $"{Environment.NewLine}{result.ToJson()}"); var personalData = await _personalDataRepository.GetAsync(result.MessageData.ClientId); var msg = await _emailGenerator.GenerateUserRegisteredMsg(personalData); await _smtpEmailSender.SendBroadcastAsync(result.BroadcastGroup, msg); }
private async Task HandlePlainTextBroadcastAsync(SendBroadcastData <PlainTextBroadCastData> result) { await _log.WriteInfoAsync("EmailRequestQueueConsumer", "HandlePlainTextBroadcastAsync", null, $"DT: {DateTime.UtcNow.ToIsoDateTime()}" + $"{Environment.NewLine}{result.ToJson()}"); var msg = new EmailMessage { Body = result.MessageData.Text, IsHtml = false, Subject = $"[{result.BroadcastGroup}] {result.MessageData.Subject}" }; await _smtpEmailSender.SendBroadcastAsync(result.BroadcastGroup, msg); }