Exemplo n.º 1
0
        public async Task SendConfirmRegistrationAsync(string address, string email)
        {
            var token    = _mailTokenService.EncryptEmailConfirmationToken(address, email);
            var template = await _templateProvider.GetEmailTemplateAsync();

            template = template
                       .Replace("{SUBJECT}", "Please confirm email")
                       .Replace("{BODY}", "To complete registration please click the button below.")
                       .Replace("{BUTTON}", "Start work")
                       .Replace("{BUTTONHREF}", _siteUrls.GetConfirmEmailUrl(token, false));

            await _mailSender.SendAsync(email, "Email confirmation", template);
        }