public bool SendEmailToUpdatePassword(HttpContext httpContext, string email) { var decodedEmail = ConvertString.Base64Decode(email); var currentUrl = httpContext.Request.Scheme + "://" + httpContext.Request.Host.Value; var client = GetUser(decodedEmail); if (client != null) { var userId = ConvertString.MD5Encode(client.Id.ToString()); var redirectUrl = $"{currentUrl}/modifier-password/{userId}"; var content = EmailTemplate.EmailContent(DemandUpdatePWEmailTemplate.Path) .Replace(EmailTemplate.UserName, client.FirstName) .Replace(EmailTemplate.ResetLink, redirectUrl); _emailService.SendEmail(decodedEmail, DemandUpdatePWEmailTemplate.Subject, content); return(true); } else { return(false); } }