Inheritance: System.Configuration.ConfigurationSection
        public ExpressEmail()
        {
            var defaultConfiguration = (ExpressEmailConfiguration)ConfigurationManager.GetSection("emailConfiguration");

            if (defaultConfiguration == null || defaultConfiguration.MainEmailConfiguration == null)
                throw new InvalidOperationException("can't create ExpressEmail without email configuration, please check web.config or app.config file");

            _emailConfiguration = defaultConfiguration;

            ConfigSmtpClientWithMainEmailConfiguration();

            ConfigMailMessage();
        }
 public ExpressEmail Create(ExpressEmailConfiguration configuration)
 {
     return new ExpressEmail(configuration);
 }
 public ExpressEmail(ExpressEmailConfiguration configuration)
 {
     _emailConfiguration = configuration;
     ConfigSmtpClientWithMainEmailConfiguration();
     ConfigMailMessage();
 }