public static SmtpAdapter GetSmtpAdaptor()
        {
            UserNotificationEmail userNotificationEmail =
                new UserNotificationEmail {
                AdminEmail    = ConfigurationManager.AppSettings["adminEmail"],
                AdminFullName = ConfigurationManager.AppSettings["adminFullName"],
                Body          = Utils.ReadFile(ConfigurationManager.AppSettings["userNotificationEmailBodyFilename"]),
                Subject       = ConfigurationManager.AppSettings["userNotificationEmailSubject"],
                VersionOneUrl = ConfigurationManager.AppSettings["V1Instance"]
            };
            AdminNotificationEmail adminNotificationEmail =
                new AdminNotificationEmail {
                AdminEmail   = ConfigurationManager.AppSettings["adminEmail"],
                BodyTemplate = Utils.ReadFile(ConfigurationManager.AppSettings[
                                                  "adminNotificationEmailBodyTemplateFilename"]),
                AddedUsersSection = Utils.ReadFile(ConfigurationManager.AppSettings[
                                                       "adminNotificationEmailBodyNewUsersFilename"]),
                ReactivatedUsersSection = Utils.ReadFile(ConfigurationManager.AppSettings[
                                                             "adminNotificationEmailBodyReactivatedUsersFilename"]),
                DeactivatedUsersSection = Utils.ReadFile(ConfigurationManager.AppSettings[
                                                             "adminNotificationEmailBodyDeactivatedUsersFilename"]),
                Subject       = ConfigurationManager.AppSettings["adminNotificationEmailSubject"],
                VersionOneUrl = ConfigurationManager.AppSettings["V1Instance"]
            };

            SmtpClient smtpClient = new SmtpClient();

            smtpClient.EnableSsl = bool.Parse(ConfigurationManager.AppSettings["smtpEnableSSL"]);
            return(new SmtpAdapter(userNotificationEmail, adminNotificationEmail, smtpClient));
        }
        public static SmtpAdapter GetSmtpAdaptor() {
            UserNotificationEmail userNotificationEmail =
                new UserNotificationEmail {
                    AdminEmail = ConfigurationManager.AppSettings["adminEmail"],
                    AdminFullName = ConfigurationManager.AppSettings["adminFullName"],
                    Body = Utils.ReadFile(ConfigurationManager.AppSettings["userNotificationEmailBodyFilename"]),
                    Subject = ConfigurationManager.AppSettings["userNotificationEmailSubject"],
                    VersionOneUrl = ConfigurationManager.AppSettings["V1Instance"]
                };
            AdminNotificationEmail adminNotificationEmail =
                new AdminNotificationEmail {
                    AdminEmail = ConfigurationManager.AppSettings["adminEmail"],
                    BodyTemplate = Utils.ReadFile(ConfigurationManager.AppSettings[
                                                        "adminNotificationEmailBodyTemplateFilename"]),
                    AddedUsersSection = Utils.ReadFile(ConfigurationManager.AppSettings[
                                                        "adminNotificationEmailBodyNewUsersFilename"]),
                    ReactivatedUsersSection = Utils.ReadFile(ConfigurationManager.AppSettings[
                                                        "adminNotificationEmailBodyReactivatedUsersFilename"]),
                    DeactivatedUsersSection = Utils.ReadFile(ConfigurationManager.AppSettings[
                                                        "adminNotificationEmailBodyDeactivatedUsersFilename"]),
                    Subject = ConfigurationManager.AppSettings["adminNotificationEmailSubject"],
                    VersionOneUrl = ConfigurationManager.AppSettings["V1Instance"]
                };

            SmtpClient smtpClient = new SmtpClient();
            smtpClient.EnableSsl = bool.Parse(ConfigurationManager.AppSettings["smtpEnableSSL"]);
            return new SmtpAdapter(userNotificationEmail, adminNotificationEmail, smtpClient);
        }
 public SmtpAdapter(UserNotificationEmail userEmail, AdminNotificationEmail adminEmail, SmtpClient smtpClient)
     : this(userEmail, adminEmail)
 {
     this.smtpClient = smtpClient;
 }
 public SmtpAdapter(UserNotificationEmail userEmail, AdminNotificationEmail adminEmail)
 {
     this.adminEmail = adminEmail;
     this.userEmail  = userEmail;
 }
 public SmtpAdapter(UserNotificationEmail userEmail, AdminNotificationEmail adminEmail, SmtpClient smtpClient)
     : this(userEmail, adminEmail) {
     this.smtpClient = smtpClient;
 }
 public SmtpAdapter(UserNotificationEmail userEmail, AdminNotificationEmail adminEmail) {
     this.adminEmail = adminEmail;
     this.userEmail = userEmail;
 }