public async Task <IActionResult> EmailMyTasksAsync(CancellationToken cancellationToken) { var email = ExtractJWTEmail(); if (!string.IsNullOrEmpty(email)) { var tasks = await _dataRepository.GetUserTasksByEmail(email); return(Ok(await _emailRepository.SendEmail( _appSettings.Email.UserName, email, "My Tasks", FormatTasks(tasks)))); } else { return(NotFound("failed to extract user data")); } }