<%--
//-----------------------------------------------------------
// 文件名称: System_EmailConfig_Operate.aspx
// 页面名称: System_EmailConfig_Operate.aspx.cs
// 描    述:邮件发送
//
// 修改标识: Add By 钟治宇 //2008-12-1   发送邮件地址错误 　添加了一个　Testbox 2008-12-9 
// 修改标识:2008-12-9  改了界面
//-----------------------------------------------------------
--%>
<%@ page language="C#" autoeventwireup="true" inherits="V5Shop.Admin.System_EmailConfig_Operate, V5Shop.Shop.Config" enableviewstatemac="false" enableEventValidation="false" viewStateEncryptionMode="Never" %>

<%@ Register Src="control/PageBottom.ascx" TagName="PageBottom" TagPrefix="uc1" %>
<%@ Register Assembly="V5Shop.Control" Namespace="V5Shop.Control" TagPrefix="cc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>邮件服务器操作</title>
    <link href="css/css.css" rel="stylesheet" type="text/css" />
    <link href="css/control.css" rel="stylesheet" type="text/css" />
    <link href="js/calendar-system.css" rel="stylesheet" type="text/css" />

    <script type="text/javascript" language="javascript" src="js/Common.js"></script>

    <script type="text/javascript" language="javascript" src="Js/Calendar.js"></script>

    <script type="text/javascript" language="javascript" src="Js/Calendar-zh.js"></script>

    <script type="text/javascript" language="javascript" src="Js/Calendar-Setup.js"></script>

</head>
<body>
    <form id="form1" runat="server">
        <div>
            <div class="OperateTitle">
                <div>
                    <asp:Label ID="lblAdd" runat="server" Text="【邮件服务器添加】"></asp:Label>
                    <asp:Label ID="lblEdit" runat="server" Text="【邮件服务器编辑】" Visible="False"></asp:Label>
                    <a href="System_EmailConfig_Manage.aspx" title="返回公告列表">返回列表</a>
                </div>
            </div>
            <div>
                <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" id="OperateTable">
                    <tr class="F7tr">
                        <td align="right" width="20%" height="30">
                            <asp:Label ID="lblSendType" runat="server" Text="发送方式："></asp:Label>
                        </td>
                        <td align="left">
                            <asp:DropDownList ID="ddlSendType" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlSendType_SelectedIndexChanged">
                            </asp:DropDownList>
                            <asp:Label ID="lblCheckResult" runat="server"></asp:Label></td>
                    </tr>
                    <tr class="FFtr">
                        <td align="right" height="30">
                            <cc1:HelpCtrl ID="HelpCtrl1" runat="server" FontColor="red" Header="Smtp服务器地址" ImageURL="images/help.gif"
                                Text="邮件服务器地址。如您的邮件是aa@163.com.则SMTP地址是:smtp.163.com" />
                            <asp:Label ID="lblSmtp" runat="server" Text="Smtp服务器地址："></asp:Label>
                        </td>
                        <td align="left">
                            <asp:TextBox ID="txtSmtp" runat="server" MaxLength="50" Width="150px">smtp.163.com</asp:TextBox>
                            <span class="NeedMsg">*</span>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtSmtp"
                                ErrorMessage="不能为空"></asp:RequiredFieldValidator></td>
                    </tr>
                    <tr class="F7tr">
                        <td height="30" align="right">
                            <cc1:HelpCtrl ID="HelpCtrl2" runat="server" FontColor="red" Header="服务器端口" ImageURL="images/help.gif"
                                Text="邮件发送端口，默认为25。注意此端口是您的服务器使用端口。" />
                            <asp:Label ID="lblPort" runat="server" Text="服务器端口："></asp:Label>
                        </td>
                        <td align="left">
                            <asp:TextBox ID="txtPort" runat="server" Width="150px">25</asp:TextBox>
                            <span class="NeedMsg">*</span>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtPort"
                                ErrorMessage="不能为空" Display="Dynamic"></asp:RequiredFieldValidator>
                            <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ControlToValidate="txtPort"
                                Display="Dynamic" ErrorMessage="只能为数字" ValidationExpression="\d*"></asp:RegularExpressionValidator></td>
                    </tr>
                    <tr class="FFtr">
                        <td height="30" align="right">
                            <cc1:HelpCtrl ID="HelpCtrl3" runat="server" FontColor="red" Header="发件人" ImageURL="images/help.gif"
                                Text="发送邮件的名称，也可以是是公司名称。如：小王、上海威博等" />
                            <asp:Label ID="lblName" runat="server" Text="发件人："></asp:Label>
                        </td>
                        <td align="left">
                            <asp:TextBox ID="txtName" runat="server" MaxLength="50" Width="150px"></asp:TextBox>
                            <span class="NeedMsg">*</span>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ControlToValidate="txtName"
                                ErrorMessage="不能为空"></asp:RequiredFieldValidator></td>
                    </tr>
                    <tr class="FFtr">
                        <td height="30" align="right">
                            <cc1:HelpCtrl ID="HelpCtrl4" runat="server" FontColor="red" Header="邮件发送帐号" ImageURL="images/help.gif"
                                Text="用于发送邮件的帐号！注意此帐号必须是一个有效帐号，否则将导致邮件无法成功发送。" />
                            <asp:Label ID="lblLoginId" runat="server" Text="邮件发送帐号："></asp:Label>
                        </td>
                        <td align="left">
                            <asp:TextBox ID="txtLoginId" runat="server" MaxLength="100" Width="150px"></asp:TextBox>
                            <span class="NeedMsg">*</span>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="txtLoginId"
                                ErrorMessage="不能为空"></asp:RequiredFieldValidator>
                            注：只要填写用户名，不用加后缀.(如：@163.com)</td>
                    </tr>
                    <tr class="F7tr">
                        <td align="right" style="height: 30px">
                            <cc1:HelpCtrl ID="HelpCtrl5" runat="server" FontColor="red" Header="登录密码" ImageURL="images/help.gif"
                                Text="邮件帐号的登录密码。密码与帐号必须匹配。否则会影响邮件发送" />
                            <asp:Label ID="lblLoginPass" runat="server" Text="登陆密码："></asp:Label>
                        </td>
                        <td align="left" style="height: 30px">
                            <asp:TextBox ID="txtLoginPass" runat="server" TextMode="Password" MaxLength="50" Width="150px"></asp:TextBox>
                            <span class="NeedMsg">*</span>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="txtLoginPass"
                                ErrorMessage="不能为空"></asp:RequiredFieldValidator></td>
                    </tr>
                    <tr class="FFtr">
                        <td height="30" align="right">
                            <cc1:HelpCtrl ID="HelpCtrl6" runat="server" FontColor="red" Header="邮件回复地址" ImageURL="images/help.gif"
                                Text="客户回复邮件时的接收地址。" />
                            <asp:Label ID="lblRevertEmail" runat="server" Text="邮件回复地址："></asp:Label>
                        </td>
                        <td align="left">
                            <asp:TextBox ID="txtRevertEmail" runat="server" MaxLength="100" Width="150px"></asp:TextBox>
                            <span class="NeedMsg">*</span>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="txtRevertEmail"
                                ErrorMessage="不能为空" Display="Dynamic"></asp:RequiredFieldValidator>
                            <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtRevertEmail"
                                Display="Dynamic" ErrorMessage="Email格式不正确！" ValidationExpression="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>
                            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;注：邮件回复地址必须对应SMTP服务器地址</td>
                    </tr>
                    <tr class="F7tr">
                        <td align="right" style="height: 30px">
                            <cc1:HelpCtrl ID="HelpCtrl7" runat="server" FontColor="red" Header="邮件编码" ImageURL="images/help.gif"
                                Text="发送邮件时所采用的编码方式" />
                            <asp:Label ID="lblCode" runat="server" Text="邮件编码："></asp:Label>
                        </td>
                        <td align="left" style="height: 30px">
                            <asp:RadioButtonList ID="rblCode" runat="server" RepeatDirection="Horizontal" CssClass="radioaspx">
                            </asp:RadioButtonList>
                        </td>
                    </tr>
                    <tr class="FFtr">
                        <td align="right" style="height: 40px">
                            <asp:Label ID="lblIsUsed" runat="server" Text="是否启用："></asp:Label>
                        </td>
                        <td align="left" style="height: 40px">
                            <asp:CheckBox ID="cbIsUsed" runat="server" Text="是否启用" CssClass="checkboxaspx" />
                            <span class="NeedMsg"></span>
                        </td>
                    </tr>
                    <tr class="F7tr">
                        <td align="right" style="height: 40px">
                            <asp:Label ID="lblEmail" runat="server" Text="邮件地址："></asp:Label>
                        </td>
                        <td align="left" style="height: 40px">
                            <asp:TextBox ID="txtEmail" runat="server" Width="150px"></asp:TextBox>&nbsp;
                            <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" ControlToValidate="txtEmail"
                                Display="Dynamic" ErrorMessage="Email格式不正确！" ValidationExpression="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>
                            <asp:Button ID="btnSendTest" runat="server" CausesValidation="False" CssClass="button"
                                Text="测试邮件发送" OnClick="btnSendTest_Click" /><span class="NeedMsg"></span></td>
                    </tr>
                    <tr class="FFtr">
                        <td height="30" align="right">
                        </td>
                        <td align="left">
                            <asp:Button ID="btnAdd" runat="server" Text="确定" OnClick="btnAdd_Click" class="button" />
                            <asp:Button ID="btnEdit" runat="server" Text="更新" OnClick="btnEdit_Click" Visible="False"
                                class="button" />
                            <input id="iptReset" runat="server" type="reset" value="重置" class="button" />
                            <input id="btnBack" runat="server" type="button" value="返回列表" onclick="window.location.href='System_EmailConfig_Manage.aspx'"
                                class="button" />
                        </td>
                    </tr>
                </table>

                <script type="text/javascript">
            //加TABLE样式
            InitTrClass();
                </script>

            </div>
        </div>
    </form>
    <uc1:PageBottom ID="PageBottom1" runat="server" />
</body>
</html>
