public async Task <IActionResult> GetEmail(int emailId) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } try { var emailMessage = await _emailMessageService.GetUndeletedForUserAsync(UserId, emailId); return(Json(emailMessage)); } catch (Exception e) { return(BadRequest(e.Message)); } }