public static void AddRecipientsFromGroup(this MailMessage msg, RecipientAddresses addresses) { AddAddressesToCollection(addresses.To, msg.To); AddAddressesToCollection(addresses.Bcc, msg.Bcc); }
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
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