Exemple #1
0
        public async Task SendOrganizationAcceptedEmailAsync(string organizationName, string userEmail,
                                                             IEnumerable <string> adminEmails)
        {
            var message = CreateDefaultMessage($"User {userEmail} Has Accepted Invite", adminEmails);
            var model   = new OrganizationUserAcceptedViewModel
            {
                OrganizationName = CoreHelpers.SanitizeForEmail(organizationName),
                UserEmail        = userEmail,
                WebVaultUrl      = _globalSettings.BaseServiceUri.VaultWithHash,
                SiteName         = _globalSettings.SiteName
            };

            await AddMessageContentAsync(message, "OrganizationUserAccepted", model);

            await _mailDeliveryService.SendEmailAsync(message);
        }
Exemple #2
0
        public async Task SendOrganizationAcceptedEmailAsync(string organizationName, string userEmail,
                                                             IEnumerable <string> adminEmails)
        {
            var message = CreateDefaultMessage($"User {userEmail} Has Accepted Invite", adminEmails);
            var model   = new OrganizationUserAcceptedViewModel
            {
                OrganizationName = organizationName,
                UserEmail        = userEmail,
                WebVaultUrl      = _globalSettings.BaseVaultUri,
                SiteName         = _globalSettings.SiteName
            };

            message.HtmlContent = _engine.Parse("OrganizationUserInvited", model);
            message.TextContent = _engine.Parse("OrganizationUserInvited.text", model);
            await _mailDeliveryService.SendEmailAsync(message);
        }
Exemple #3
0
        public async Task SendOrganizationAcceptedEmailAsync(Organization organization, string userIdentifier,
                                                             IEnumerable <string> adminEmails)
        {
            var message = CreateDefaultMessage($"Action Required: {userIdentifier} Needs to Be Confirmed", adminEmails);
            var model   = new OrganizationUserAcceptedViewModel
            {
                OrganizationId   = organization.Id,
                OrganizationName = CoreHelpers.SanitizeForEmail(organization.Name),
                UserIdentifier   = userIdentifier,
                WebVaultUrl      = _globalSettings.BaseServiceUri.VaultWithHash,
                SiteName         = _globalSettings.SiteName
            };

            await AddMessageContentAsync(message, "OrganizationUserAccepted", model);

            message.Category = "OrganizationUserAccepted";
            await _mailDeliveryService.SendEmailAsync(message);
        }