private async Task HandleRequestForDocumentEmailAsync(SendEmailData <RequestForDocumentData> result) { await _log.WriteInfoAsync("EmailRequestQueueConsumer", "HandleRequestForDocumentEmailAsync", null, $"DT: {DateTime.UtcNow.ToIsoDateTime()}" + $"{Environment.NewLine}{result.ToJson()}"); var msg = await _emailGenerator.GenerateRequestForDocumentMsg(result.MessageData); await _smtpEmailSender.SendEmailAsync(result.EmailAddress, msg); }
private async Task HandlePlainTextEmail(SendEmailData <PlainTextData> result) { await _log.WriteInfoAsync("EmailRequestQueueConsumer", "HandlePlainTextEmail", null, $"DT: {DateTime.UtcNow.ToIsoDateTime()}" + $"{Environment.NewLine}{result.ToJson()}"); var msg = new EmailMessage { Body = result.MessageData.Text, IsHtml = false, Subject = result.MessageData.Subject }; await _smtpEmailSender.SendEmailAsync(result.EmailAddress, msg, result.MessageData.Sender); }