⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 editemailgateway.jsp

📁 jive的源码
💻 JSP
📖 第 1 页 / 共 3 页
字号:
            return;        }        // Set smtp properties        SmtpExporter smtpExporter = (SmtpExporter) gateway.getGatewayExporter();        smtpExporter.setHost(outboundHost);        smtpExporter.setPort(outboundPort);        smtpExporter.setSSLEnabled(outboundSSLEnabled);        smtpExporter.setUsername(outboundUsername);        smtpExporter.setPassword(outboundPassword);        smtpExporter.setDefaultFromAddress(fromAddress);        smtpExporter.setReplyToAddress(replyToAddress);        smtpExporter.setToAddress(toAddress);        smtpExporter.setOrganization(organization);        smtpExporter.setDebugEnabled(debug);        smtpExporter.setAttachmentsEnabled(outboundAttach);        smtpExporter.setEmailPrefEnabled(emailPref);        smtpExporter.setFromAddressOnly(fromPref);        smtpExporter.setAllowExportAgain(allowExportAgain);        smtpExporter.setUpdateMessageIDOnExport(updateMessageID);        if (createNew) {            // save the gateway            gatewayManager.saveGateways();        }        else {            gatewayManager.removeGateway(index);            gatewayManager.addGateway(gateway, index);        }        if (exportOnce) {            session.setAttribute("gateway", gateway);            response.sendRedirect("exportGatewayOnce.jsp?forum="+forumID+"&exportAfter="+exportAfter);            return;        }        else {            // go back to the gateways page            response.sendRedirect("gateways.jsp?forum="+forumID);            return;        }    }    // if edit, then get the existing properties of the gateway from the installed gateway    if (edit && !reload) {        Gateway gateway = gatewayManager.getGateway(index);        if (gateway instanceof ImapGateway) {            gatewayType = IMAP_GATEWAY;        }        else {            gatewayType = POP3_GATEWAY;        }        // retrieve properties        if (gatewayType.equals(IMAP_GATEWAY)) {            ImapImporter imapImporter = (ImapImporter) gateway.getGatewayImporter();            inboundHost       = imapImporter.getHost();            inboundPort       = imapImporter.getPort();            inboundUsername   = imapImporter.getUsername();            inboundPassword   = imapImporter.getPassword();            inboundFolder     = imapImporter.getFolder();            tempParentBody    = imapImporter.getTemporaryParentBody();            deleteEnabled     = imapImporter.isDeleteEnabled();            inboundSSLEnabled = imapImporter.isSSLEnabled();            debug             = imapImporter.isDebugEnabled();            inboundAttach     = imapImporter.isAttachmentsEnabled();            subjectCheckEnabled = imapImporter.isSubjectParentageCheckEnabled();            if (inboundUsername != null && inboundUsername.equals("null")) {                inboundUsername = null;            }            if (inboundPassword != null && inboundPassword.equals("null")) {                inboundPassword = null;            }        }        else if (gatewayType.equals(POP3_GATEWAY)) {            Pop3Importer pop3Importer = (Pop3Importer) gateway.getGatewayImporter();            inboundHost       = pop3Importer.getHost();            inboundPort       = pop3Importer.getPort();            inboundUsername   = pop3Importer.getUsername();            inboundPassword   = pop3Importer.getPassword();            tempParentBody    = pop3Importer.getTemporaryParentBody();            deleteEnabled     = pop3Importer.isDeleteEnabled();            inboundSSLEnabled = pop3Importer.isSSLEnabled();            debug             = pop3Importer.isDebugEnabled();            inboundAttach     = pop3Importer.isAttachmentsEnabled();            subjectCheckEnabled = pop3Importer.isSubjectParentageCheckEnabled();            if (inboundUsername != null && inboundUsername.equals("null")) {                inboundUsername = null;            }            if (inboundPassword != null && inboundPassword.equals("null")) {                inboundPassword = null;            }        }        else {            // ERROR  --- handle ??        }        SmtpExporter smtpExporter = (SmtpExporter) gateway.getGatewayExporter();        outboundHost       = smtpExporter.getHost();        outboundPort       = smtpExporter.getPort();        outboundSSLEnabled = smtpExporter.isSSLEnabled();        outboundUsername   = smtpExporter.getUsername();        outboundPassword   = smtpExporter.getPassword();        fromAddress        = smtpExporter.getDefaultFromAddress();        replyToAddress     = smtpExporter.getReplyToAddress();        toAddress          = smtpExporter.getToAddress();        organization       = smtpExporter.getOrganization();        emailPref          = smtpExporter.isEmailPrefEnabled();        fromPref           = smtpExporter.isFromAddressOnly();        outboundAttach     = smtpExporter.isAttachmentsEnabled();        allowExportAgain   = smtpExporter.isAllowExportAgain();        updateMessageID    = smtpExporter.isUpdateMessageIDOnExport();    }%><%@ include file="header.jsp" %><p><%  // Title of this page and breadcrumbs    String title = null;    if (importOnce) {        title = "Import an Email Gateway";    } else if (exportOnce) {        title = "Export an Email Gateway";    } else if (add) {        title = "Add an Email Gateway";    } else {        title = "Edit Email Gateway Settings";    }    String[][] breadcrumbs = {        {"Main", "main.jsp"},        {"Forums", "forums.jsp"},        {"Gateways", "gateways.jsp?forum="+forumID},        {title, "editEmailGateway.jsp?forum="+forumID+"&add="+add+"&edit="+edit+"&index="+index+"&exportOnce="+            exportOnce+"&importOnce="+importOnce}    };%><%@ include file="title.jsp" %><font size="-1"><% if (importOnce) { %>Import an email gateway using the forms below.<%  } else if (exportOnce) { %>Export to an email gateway using the forms below.<%  } else if (add) { %>Add an email gateway using the forms below.<%  } else { %>Edit the email gateway settings using the forms below.<%  } %></font><p><script language="JavaScript" type="text/javascript"><!--function reloadForm(setAdvanced) {    document.forms.postForm.save.value="false";    document.forms.postForm.reload.value="true";    if (setAdvanced) {        document.forms.postForm.advanced.value="<%= !advanced %>";    }    document.forms.postForm.submit();    return false;}function popupHelp(page) {    var win = window.open(page,'newWindow','width=350,height=400,menubar=yes,location=no,personalbar=no,scrollbars=yes,resize=yes');}//--></script></script><form action="editEmailGateway.jsp" name="postForm"><input type="hidden" name="forum" value="<%= forumID %>"><input type="hidden" name="save" value="true"><input type="hidden" name="add" value="<%= add %>"><input type="hidden" name="importOnce" value="<%= importOnce %>"><input type="hidden" name="exportOnce" value="<%= exportOnce %>"><input type="hidden" name="edit" value="<%= edit %>"><input type="hidden" name="index" value="<%= index %>"><input type="hidden" name="advanced" value="<%= advanced %>"><input type="hidden" name="reload" value="<%= reload %>"><% if (!advanced) { %><input type="hidden" name="inboundPort" value="<%= inboundPort %>"><input type="hidden" name="inboundSSLEnabled" value="<%= inboundSSLEnabled %>"><input type="hidden" name="inboundFolder" value="<% if (inboundFolder != null) { %><%= inboundFolder %><% } %>"><input type="hidden" name="tempParentBody" value="<% if (tempParentBody != null) { %><%= tempParentBody %><% } %>"><input type="hidden" name="deleteEnabled" value="<%= deleteEnabled %>"><input type="hidden" name="inboundAttach" value="<%= inboundAttach %>"><input type="hidden" name="subjectCheckEnabled" value="<%= subjectCheckEnabled %>"><input type="hidden" name="outboundPort" value="<%= outboundPort %>"><input type="hidden" name="outboundSSLEnabled" value="<%= outboundSSLEnabled %>"><input type="hidden" name="outboundUsername" value="<% if (outboundUsername != null) { %><%= outboundUsername %><% } %>"><input type="hidden" name="outboundPassword" value="<% if (outboundPassword != null) { %><%= outboundPassword %><% } %>"><input type="hidden" name="organization" value="<% if (organization != null) { %><%= organization %><% } %>"><input type="hidden" name="debug" value="<%= debug %>"><input type="hidden" name="exportAfter" value="<% if (exportAfter != null) { %><%= exportAfter %><% } %>"><input type="hidden" name="importAfter" value="<% if (importAfter != null) { %><%= importAfter %><% } %>"><input type="hidden" name="updateMessageID" value="<%= updateMessageID %>"><input type="hidden" name="allowExportAgain" value="<%= allowExportAgain %>"><input type="hidden" name="outboundAttach" value="<%= outboundAttach %>"><input type="hidden" name="emailPref" value="<%= emailPref %>"><input type="hidden" name="fromPref" value="<%= fromPref %>"><%  }    if (add) { %><input type="hidden" name="createNew" value="true"><%  }    if (!exportOnce) {       String message = getOneTimeMessage(session, "importError");        if (message != null) {%>    <font size="-1" color="#bb0000"><b><%= message %></b></font>    <p><%      } %><font size="-1"><b>Incoming Mail Settings</b></font><ul>    <table cellpadding="3" cellspacing="0" border="0">

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -