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