username@email.com
2025-05-14 99ddfbcecf0fa2881eb3a91028257eef87dab6de
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using CY.BLL;
using CY.Infrastructure.DESEncrypt;
using CY.Config;
 
namespace CY.WebForm.Pages.sysglobal
{
    //吴辉
    //邮箱配置
    public partial class EmailConfig : BasePage
    {
        //邮箱密码赋值使用
        public string page_EmailPwd = "";
 
        //页面加载
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                page_EmailPwd = DESEncrypt.Decrypt(WebInfo.Instance.EmailPwd);
                this.txtEmailServer.Value = WebInfo.Instance.EmailServer;
                this.txtEmailLoginName.Value = WebInfo.Instance.EmailLoginName;
                this.txtEmail.Value = WebInfo.Instance.Email;
                this.txtEmailPort.Value = WebInfo.Instance.EmailPort;
                this.selIsUseEmail.Value = WebInfo.Instance.IsUseEmail;
 
            }
        }
 
 
        //提交表单
        protected void btn_Submit_Config(object sender, EventArgs e)
        {
            try
            {
                WebInfo.Instance.EmailServer = this.txtEmailServer.Value.ToString();
                WebInfo.Instance.EmailLoginName = this.txtEmailLoginName.Value.ToString();
                WebInfo.Instance.Email = this.txtEmail.Value.ToString();
                WebInfo.Instance.EmailPwd = DESEncrypt.Encrypt(this.txtEmailPwd.Value.ToString());
                page_EmailPwd = this.txtEmailPwd.Value.ToString();
                WebInfo.Instance.EmailPort = this.txtEmailPort.Value.ToString();
                WebInfo.Instance.IsUseEmail = this.selIsUseEmail.Value.ToString();
                WebInfo.Instance.Update();
            }
            catch (Exception ex)
            {
                PAGEHandleException(ex);
                JavaScript.MessageBox("操作失败", this);
            }
            JavaScript.MessageBox("操作成功",this);
        }
    }
}