public async Task SendBudgetExceededMail(string userName, string email, string budgetStatus, string category) { try { string message = ""; BudgetEmailModel budgetEmailModel = new BudgetEmailModel() { UserName = userName, HeadingA = "Budget for", HeadingB = budgetStatus.Contains("exceeded") ? $"{category}" + " Exceeded": $"{category}" + " Reached", Message = budgetStatus }; message = await _viewRenderService.RenderToStringAsync("BudgetEmailMessage", budgetEmailModel); await _emailService.BudgetExceeded(email, message, category); } catch (Exception ex) { Debug.WriteLine(ex.Message); } }
private async Task SendBudgetEmail(string email, string message, string category) { await _emailService.BudgetExceeded(email, message, category); }