Пример #1
0
        public void SendBugReport(string keyGuid)
        {
            var to      = SupportTeamEmail;
            var title   = "Bug report";
            var from    = _userService.GetById(_identityService.GetIdentityId()).Email;
            var message = $"<p>Reporter: {from}</p>" + $"<p>Guid: {keyGuid}</p>";

            _messageService.SendEmail(to, message, title, true);
        }
Пример #2
0
        public Invite InviteUser(User user)
        {
            var invite = new Invite
            {
                IdUser     = user.Id,
                LinkKey    = Guid.NewGuid().ToString().Replace("-", ""),
                IsUsed     = false,
                ExpiryDate = DateTime.UtcNow.AddHours(1)
            };

            _inviteRepository.Add(invite);

            var baseUrl = BaseUrl;
            var message =
                $"You are invited to Mexem reporting system. Please follow a link to get registered: <a href=\"{baseUrl}/registration/confirm/{invite.LinkKey}\">link</a>";
            var title = "IBAR App Confirm registration";

            _messengerService.SendEmail(user.Email, message, title, true);

            return(invite);
        }