Example #1
0
        public CustomEmail(
            EmailContent emailContent,
            IViewRenderer renderer,
            IBaseUrls url)
            : base(renderer, url)
        {
            emailContent.Subject.ThrowIfNull("subject", nameof(emailContent.Subject));
            Content = emailContent.Body;
            Subject = emailContent.Subject;
            From    = emailContent.From;

            foreach (var recipient in emailContent.Recipients)
            {
                Recipients.Add(recipient);
            }

            foreach (var copy in emailContent.Cc)
            {
                Cc.Add(copy);
            }

            foreach (var hiddenCopy in emailContent.HiddenCc)
            {
                HiddenCc.Add(hiddenCopy);
            }
        }
        public UserInvitationEmail(ApplicationUser user, IBaseUrls urls, IViewRenderer renderer)
            : base(renderer, urls, new CallToActionButton("Get some magic", new MainPageLink(urls.BaseUrl)))
        {
            FirstName = user.FirstName;
            FirstName = user.FirstName;

            Recipients.Add(user.Email);
        }
Example #3
0
        public BaseUrls(XPathNodeIterator iter, IBaseUrls template)
        {
            var baseUrlsMapping = new Mapping(template != null ? template.BaseUrlMap : null);

            if (iter.MoveNext())
            {
                baseUrlsMapping.Init(iter.Current.Select("baseUrl"));
            }

            _baseUrlsMapping = baseUrlsMapping;
        }
Example #4
0
        public UserEmail(
            IEmailSender emailSender, IViewRenderer viewRenderer, IAuthorizationManager authManager, IBaseUrls urls)
        {
            emailSender.ThrowIfNull(nameof(emailSender));
            viewRenderer.ThrowIfNull(nameof(viewRenderer));

            _emailSender  = emailSender;
            _viewRenderer = viewRenderer;
            _authManager  = authManager;
            _urls         = urls;
        }
Example #5
0
 public EmailService(
     IEmailSender emailSender,
     IAuthorizationManager authManager,
     IViewRenderer viewRenderer,
     IBaseUrls url)
 {
     _emailSender = emailSender;
     _authManager = authManager;
     _view        = viewRenderer;
     _url         = url;
 }
Example #6
0
        public UserInvitationEmail(
            User user, User currentUser, IBaseUrls urls, IViewRenderer renderer)
            : base(renderer, urls, new CallToActionButton("Get some magic", new MainPageLink(urls.BaseUrl)))
        {
            user.ThrowIfNull(nameof(user));
            currentUser.ThrowIfNull(nameof(currentUser));

            FirstName = user.FirstName;
            LastName  = user.LastName;

            Recipients.Add(user.Email);
            HiddenCc.Add(currentUser.Email);
        }
Example #7
0
        protected NoReplyEmail(IViewRenderer renderer, IBaseUrls url, CallToActionButton callToAction)
        {
            renderer.ThrowIfNull(nameof(renderer));
            url.ThrowIfNull(nameof(url));

            _renderer = renderer;
            _url      = url;

            CallToAction = callToAction;

            Recipients = new List <string>();
            Cc         = new List <string>();
        }
Example #8
0
 public UserService(
     IUserRepository userRepository,
     IAuthorizationManager authorizationManager,
     EmailDomainValidatorService emailDomainValidatorService,
     IEmailSender emailSender,
     IViewRenderer viewRenderer,
     IBaseUrls baseUrls)
 {
     _userRepository              = userRepository;
     _authorizationManager        = authorizationManager;
     _emailDomainValidatorService = emailDomainValidatorService;
     _emailSender  = emailSender;
     _viewRenderer = viewRenderer;
     _baseUrls     = baseUrls;
 }
Example #9
0
 public EmailPreviewService(IViewRenderer view, IAuthorizationManager authorizationManager, IBaseUrls url)
 {
     _view = view;
     _authorizationManager = authorizationManager;
     _url = url;
 }
Example #10
0
 protected EmailBase(IViewRenderer renderer, IBaseUrls url)
     : this(renderer, url, null)
 {
 }
Example #11
0
 protected NoReplyEmail(IViewRenderer renderer, IBaseUrls url)
     : this(renderer, url, null)
 {
 }
Example #12
0
 protected NoReplyEmail(IViewRenderer renderer, IBaseUrls url, CallToActionButton callToAction)
     : base(renderer, url, callToAction)
 {
 }