예제 #1
0
        public async Task <bool> SendVerifyMail(VerifyItem item)
        {
            string code = await _verifyUserRepository.CreateCodeAsync(item.UserId);

            return(await _mailRepository.SendVerifyMail(new VerifyMail()
            {
                From = new EmailAdress()
                {
                    Email = _mailSetting.InfoMailAdress, Name = _mailSetting.InfoMailName
                },
                To = new EmailAdress()
                {
                    Email = item.Email, Name = item.FullName
                },
                Subject = $"{item.FirstName} Välkommen till Poolia, bekräfta din epost.",
                VerifyUrl = $"{_urlSetting.APIServerUrl}/api/oauth/verifyaccount/{code}"
            }));
        }
예제 #2
0
 public async Task <string> CreateCodeAsync(string userId)
 {
     return(await _verifyUserRepository.CreateCodeAsync(userId));
 }