Exemple #1
0
        public ActionResult Email(EmailModel model)
        {
            if (ModelState.IsValid)
            {
                EmailConfigInfo emailConfigInfo = BMAConfig.EmailConfig;

                emailConfigInfo.Host = model.Host;
                emailConfigInfo.Port = model.Port;
                emailConfigInfo.From = model.From;
                emailConfigInfo.FromName = model.FromName;
                emailConfigInfo.UserName = model.UserName;
                emailConfigInfo.Password = model.Password;
                emailConfigInfo.FindPwdBody = model.FindPwdBody;
                emailConfigInfo.SCVerifyBody = model.SCVerifyBody;
                emailConfigInfo.SCUpdateBody = model.SCUpdateBody;
                emailConfigInfo.WebcomeBody = model.WebcomeBody;

                BMAConfig.SaveEmailConfig(emailConfigInfo);
                Emails.ResetEmail();
                AddMallAdminLog("修改邮箱设置");
                return PromptView(Url.Action("email"), "修改邮箱设置成功");
            }
            return View(model);
        }
Exemple #2
0
        public ActionResult Email()
        {
            EmailConfigInfo emailConfigInfo = BMAConfig.EmailConfig;

            EmailModel model = new EmailModel();
            model.Host = emailConfigInfo.Host;
            model.Port = emailConfigInfo.Port;
            model.From = emailConfigInfo.From;
            model.FromName = emailConfigInfo.FromName;
            model.UserName = emailConfigInfo.UserName;
            model.Password = emailConfigInfo.Password;
            model.FindPwdBody = emailConfigInfo.FindPwdBody;
            model.SCVerifyBody = emailConfigInfo.SCVerifyBody;
            model.SCUpdateBody = emailConfigInfo.SCUpdateBody;
            model.WebcomeBody = emailConfigInfo.WebcomeBody;

            return View(model);
        }