Пример #1
0
        private async Task SendConfirmEmailAsync(ApplicationUser user)
        {
            // Send an email with this link
            string code = await this._userManager.GenerateEmailConfirmationTokenAsync(user);

            var callbackUrl = string.Format(_clientConfiguration.UrlVerifyEmail, user.Id, code);
            var uri         = new Uri(callbackUrl);

            //var callbackUrl = Url.Action("ConfirmEmail", "Account", new { userId = user.Id,  code = code }, protocol: HttpContext.Request.Scheme);
            await _messageServices.SendEmailAsync(user.Email, "Confirm your account",
                                                  "Please confirm your account by clicking this link: <a href=\"" + uri.AbsoluteUri + "\">link</a>");
        }