[workitem:59] Added smart host options for domain under MailEnable
This commit is contained in:
parent
c66050c25f
commit
99c0ebf7db
3 changed files with 74 additions and 5 deletions
|
@ -1,7 +1,7 @@
|
|||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="MailEnable_EditDomain.ascx.cs" Inherits="WebsitePanel.Portal.ProviderControls.MailEnable_EditDomain" %>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td class="SubHead" style="width:150px;"><asp:Label ID="lblCatchAll" runat="server" meta:resourcekey="lblCatchAll" Text="Catch-All Account:"></asp:Label></td>
|
||||
<td class="SubHead" style="width:200px;"><asp:Label ID="lblCatchAll" runat="server" meta:resourcekey="lblCatchAll" Text="Catch-All Account:"></asp:Label></td>
|
||||
<td class="Normal">
|
||||
<asp:DropDownList ID="ddlCatchAllAccount" runat="server" CssClass="NormalTextBox">
|
||||
</asp:DropDownList></td>
|
||||
|
@ -18,4 +18,24 @@
|
|||
<asp:DropDownList ID="ddlAbuseAccount" runat="server" CssClass="NormalTextBox">
|
||||
</asp:DropDownList></td>
|
||||
</tr>
|
||||
</table>
|
||||
</table>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td class="SubHead" style="width:200px;"><asp:Label ID="lblDomainSmartHostEnabled" runat="server" meta:resourcekey="lblDomainSmartHostEnabled" Text="Act as smart host:"></asp:Label></td>
|
||||
<td class="Normal">
|
||||
<asp:CheckBox ID="chkDomainSmartHostEnabled" Runat="server" meta:resourcekey="chkDomainSmartHostEnabled" Text="Yes"></asp:CheckBox>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="SubHead">Only smart host email from authenticated senders:</td>
|
||||
<td class="Normal" vAlign="top">
|
||||
<asp:CheckBox ID="chkDomainSmartHostAuthSenders" Runat="server" meta:resourcekey="chkDomainSmartHostAuthSenders" Text="Yes" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="SubHead">Smart host mail to:</td>
|
||||
<td class="Normal" vAlign="top">
|
||||
<asp:TextBox ID="txtDestination" runat="server" CssClass="NormalTextBox" Width="200px"></asp:TextBox>
|
||||
(enter IP address or domain name of destination)</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
|
@ -39,6 +39,7 @@ using System.Web.UI.HtmlControls;
|
|||
|
||||
using WebsitePanel.Providers.Mail;
|
||||
|
||||
|
||||
namespace WebsitePanel.Portal.ProviderControls
|
||||
{
|
||||
public partial class MailEnable_EditDomain : WebsitePanelControlBase, IMailEditDomainControl
|
||||
|
@ -50,13 +51,26 @@ namespace WebsitePanel.Portal.ProviderControls
|
|||
public void BindItem(MailDomain item)
|
||||
{
|
||||
BindMailboxes(item);
|
||||
|
||||
chkDomainSmartHostEnabled.Checked = Convert.ToBoolean(item["MailEnable_SmartHostEnabled"]);
|
||||
chkDomainSmartHostAuthSenders.Checked = Convert.ToBoolean(item["MailEnable_SmartHostAuth"]);
|
||||
txtDestination.Text = item.RedirectionHosts;
|
||||
}
|
||||
|
||||
public void SaveItem(MailDomain item)
|
||||
{
|
||||
item.CatchAllAccount = ddlCatchAllAccount.SelectedValue;
|
||||
item.AbuseAccount = ddlAbuseAccount.SelectedValue;
|
||||
item.PostmasterAccount = ddlPostmasterAccount.SelectedValue;
|
||||
|
||||
// if we have a smarthost we need to clear the catchall
|
||||
if (chkDomainSmartHostEnabled.Checked)
|
||||
item.CatchAllAccount= "";
|
||||
else
|
||||
item.CatchAllAccount = ddlCatchAllAccount.SelectedValue;
|
||||
|
||||
item["MailEnable_SmartHostEnabled"] = chkDomainSmartHostEnabled.Checked.ToString();
|
||||
item["MailEnable_SmartHostAuth"] = chkDomainSmartHostAuthSenders.Checked.ToString();
|
||||
item.RedirectionHosts = txtDestination.Text;
|
||||
}
|
||||
|
||||
private void BindMailboxes(MailDomain item)
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.3074
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
@ -66,5 +65,41 @@ namespace WebsitePanel.Portal.ProviderControls {
|
|||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.DropDownList ddlAbuseAccount;
|
||||
|
||||
/// <summary>
|
||||
/// lblDomainSmartHostEnabled control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblDomainSmartHostEnabled;
|
||||
|
||||
/// <summary>
|
||||
/// chkDomainSmartHostEnabled control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.CheckBox chkDomainSmartHostEnabled;
|
||||
|
||||
/// <summary>
|
||||
/// chkDomainSmartHostAuthSenders control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.CheckBox chkDomainSmartHostAuthSenders;
|
||||
|
||||
/// <summary>
|
||||
/// txtDestination control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox txtDestination;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue