Exemplo n.º 1
0
        public EmailDataSender(IMapper mapper, ILogic logic, ILifetimeScope autofac,
                               EmailExporterConfig config, IPackageParser parser)
        {
            this.parser = parser;
            mapper.Map(config, this);
            mapper.Map(config, Properties);

            addresses = config.RecepientGroupId > 0
                ? logic.GetRecepientAddressesByGroupId(config.RecepientGroupId)
                : new RecipientAddresses();
            this.autofac = autofac;
        } //ctor
Exemplo n.º 2
0
        public EmailDataSender(IMapper mapper, ILogic logic, ILifetimeScope autofac,
                               EmailExporterConfig config, IPackageParser parser, IConfigurationRoot serviceConfig)
        {
            this.parser = parser;
            mapper.Map(config, this);
            mapper.Map(config, Properties);

            smtpServer  = serviceConfig["EmailSenderSettings:SMTPServer"];
            fromAddress = serviceConfig["EmailSenderSettings:From"];

            addresses = config.RecepientGroupId > 0
                ? logic.GetRecepientAddressesByGroupId(config.RecepientGroupId)
                : new RecipientAddresses();
            this.autofac = autofac;
        } //ctor