Example #1
0
        public ActionResult EmailSettings()
        {
            EmailSettings settings = new EmailSettings();
            EmailSettingsVM vm = new EmailSettingsVM
            {
                EmailAddress = settings.Account,
                Password = settings.Password,
                SmtpUrl = settings.SmtpUrl,
                SmtpPort = Convert.ToInt32(settings.SmtpPort)
            };

            return View(vm);
        }
Example #2
0
        public ActionResult EmailSettings(EmailSettingsVM viewModel)
        {
            if (ModelState.IsValid)
            {
                EmailSettings settings = new EmailSettings();

                settings.Account = viewModel.EmailAddress;
                settings.Password = viewModel.Password;
                settings.SmtpUrl = viewModel.SmtpUrl;
                settings.SmtpPort = viewModel.SmtpPort.ToString();

                return RedirectToAction("Index", "FillListValues");
            }

            return View(viewModel);
        }