Пример #1
0
        public ActionResult Email(EmailSettingsViewModel model)
        {
            Settings.Instance.EmailEnabled = model.EmailEnabled;
            Settings.Instance.EmailFromAddress = model.EmailFromAddress;
            Settings.Instance.EmailHost = model.EmailHost;
            Settings.Instance.EmailHostPort = model.EmailHostPort;
            Settings.Instance.EmailEnableSsl = model.EnableSsl;
            Settings.Instance.EmailUsername = model.UserName;
            Settings.Instance.EmailPassword = model.Password;
            Settings.Instance.EmailSubjectPrefix = model.SubjectPrefix;

            Settings.SaveSettings(Settings.Instance);

            return this.View(model);
        }
Пример #2
0
        public ActionResult Email()
        {
            var model = new EmailSettingsViewModel {
                    EmailEnabled = Settings.Instance.EmailEnabled,
                    EmailFromAddress = Settings.Instance.EmailFromAddress,
                    EmailHost = Settings.Instance.EmailHost,
                    EmailHostPort = Settings.Instance.EmailHostPort,
                    EnableSsl = Settings.Instance.EmailEnableSsl,
                    UserName = Settings.Instance.EmailUsername,
                    Password = Settings.Instance.EmailPassword,
                    SubjectPrefix = Settings.Instance.EmailSubjectPrefix
                };

            return this.View(model);
        }