public async Task SendLetterToUser(UserLetterAnswerDTO userLetter) { var currentLetter = _mapper.Map <UserLetterDTO>(userLetter); string body = $"In this letter we try to help you.<br><br> We received your letter - \" {userLetter.Description}\" " + $"<br><br>We have an answer to you question!<br><br> {userLetter.Answer}" + "<br><br>We hope that we helped you!" + "<br><br>Cheers,<br>buildeR team"; var emailModel = _emailBuilder.GetFeedbackLetter(userLetter.UserEmail, userLetter.UserName, userLetter.Subject, body); await _emailService.SendEmailAsync(new List <string> { emailModel.Email }, emailModel.Subject, emailModel.Title, emailModel.Body); currentLetter.IsRespond = true; await UpdateUserLetter(currentLetter); }
public async Task SendLetterToUser([FromBody] UserLetterAnswerDTO userLetter) { await _userService.SendLetterToUser(userLetter); }