HEX
Server: nginx/1.28.1
System: Linux 10-41-63-61 6.8.0-31-generic #31-Ubuntu SMP PREEMPT_DYNAMIC Sat Apr 20 00:40:06 UTC 2024 x86_64
User: www (1001)
PHP: 7.4.33
Disabled: passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Upload Files
File: /www/wwwroot/fuwufei.xxlht.com1/application/admin/template/system/smtp.htm
{include file="public/layout"/}
<body class="bodystyle" style=" overflow-y: scroll;min-width:auto;">
<div id="append_parent"></div>
<div id="ajaxwaitid"></div>
<div class="page" style="min-width:auto;">
    {empty name="$iframes"}
    {include file="system/bar" /}
    {/empty}
    <div class="flexigrid">
        {empty name="$iframes"}
        <div class="mDiv">
            <div class="ftitle">
                <h3>接口配置</h3>
            </div>
            <div title="刷新数据" class="pReload"><i class="fa fa-refresh"></i></div>
            <!-- <div class="sDiv">
                <div class="sDiv2 addartbtn fl" style="margin-right: 6px;">
                    <input type="button" class="btn" value="短信配置" onclick="window.location.href='{:url("System/sms")}';">
                </div>
            </div> -->
            <div class="sDiv">
                <div class="sDiv2 addartbtn fl" style="margin-right: 6px;">
                    <input type="button" class="btn selected" value="邮件配置" onclick="window.location.href='{:url("System/smtp")}';">
                </div>
            </div>
        </div>
        {/empty}
        <form method="post" id="handlepost" action="{:url('System/smtp')}">
            <div class="ncap-form-default">
                <dl class="row">
                    <dt class="tit">
                        <label for="smtp_server">发送邮件内容</label>
                    </dt>
                    <dd class="opt">
                        [<a href="javascript:void(0);" onclick="click_to_eyou_1575506523('{:url('System/smtp_tpl')}','邮件配置模板');">配置模板</a>]
                        <p class=""></p>
                    </dd>
                </dl>
                <dl class="row">
                    <dt class="tit">
                        <label for="smtp_server"><em>*</em>邮件发送服务器(SMTP)</label>
                    </dt>
                    <dd class="opt">
                        <input id="smtp_server" name="smtp_server" value="{$config.smtp_server|default=''}" class="input-txt" type="text"/>
                        <p class="">发送邮箱的smtp地址。如: smtp.qq.com或smtp.gmail.com</p>
                    </dd>
                </dl>
                <dl class="row">
                    <dt class="tit">
                        <label for="smtp_port"><em>*</em>服务器(SMTP)端口</label>
                    </dt>
                    <dd class="opt">
                        <input id="smtp_port" name="smtp_port" value="{$config.smtp_port|default=465}" class="input-txt" type="text"/>
                        <p class="notic">
                            smtp的端口,默认为465,具体请参看各STMP服务商的设置说明。
                        </p>
                        <p class=""><span style="color: red;">注意:如果使用阿里云服务器或Gmail,请将端口设为465,其他的可以尝试端口设为25</span>
                        </p>
                    </dd>
                </dl>
                <dl class="row">
                    <dt class="tit">
                        <label for="smtp_user"><em>*</em>邮箱账号</label>
                    </dt>
                    <dd class="opt">
                        <input id="smtp_user" name="smtp_user" value="{$config.smtp_user|default=''}" class="input-txt" type="text"/>
                    </dd>
                </dl>
                <dl class="row">
                    <dt class="tit">
                        <label for="smtp_pwd"><em>*</em>邮箱授权码</label>
                    </dt>
                    <dd class="opt">
                        <input id="smtp_pwd"  name="smtp_pwd" value="{$config.smtp_pwd|default=''}" class="input-txt" type="text"/>
                        <p class="">使用发送邮件的邮箱授权码。具体请点击参看【<a href="JavaScript:void(0);" onclick="click_to_eyou_1575506523('https://www.eyoucms.com/plus/view.php?aid=5552','获取邮箱授权码')">使用指南</a>】</p>
                    </dd>
                </dl>
                <dl class="row">
                    <dt class="tit"><em>*</em>管理员邮箱地址</dt>
                    <dd class="opt">
                        <input value="{$config.smtp_from_eamil|default=''}" name="smtp_from_eamil" id="smtp_from_eamil" class="input-txt" type="text">
                        <input value="测试发送" class="input-btn" onclick="sendEmail();" type="button">
                        <p class="notic">多个邮箱可以用逗号隔开</p>
                    </dd>
                </dl>

                <dl class="row">
                    <dt class="tit">邮箱提醒</dt>
                    <dd class="opt">
                        <ul class="nc-row ncap-waybill-list">
                            <li style="width: 100%;">
                                <label class="label" onmouseover="layer_tips = layer.tips('对管理员发送邮件提醒', this, {time:100000});" onmouseout="layer.close(layer_tips);">
                                    <input class="check" type="checkbox" name="smtp_shop_order_pay" {if condition="!empty($config.smtp_shop_order_pay)"} value="1" checked="checked" {/if}><span>订单付款</span>
                                </label>
                                &nbsp; &nbsp;
                                <label class="label" onmouseover="layer_tips = layer.tips('对用户发送邮件提醒', this, {time:100000});" onmouseout="layer.close(layer_tips);">
                                    <input class="check" type="checkbox" name="smtp_shop_order_send" {if condition="!empty($config.smtp_shop_order_send)"} value="1" checked="checked" {/if}><span>订单发货</span>
                                </label>
                            </li>
                        </ul>
                    </dd>
                </dl>

                <div class="bot">
                    <input type="hidden" name="iframes" value="{$iframes}">
                    <a href="JavaScript:void(0);" class="ncap-btn-big ncap-btn-green" onclick="check_form();">确认提交</a>
                </div>
            </div>
        </form>
    </div>
</div>
<script type="text/javascript">
    $(document).ready(function(){
        // 表格行点击选中切换
        $('#flexigrid > table>tbody >tr').click(function(){
            $(this).toggleClass('trSelected');
        });

        // 点击刷新数据
        $('.fa-refresh').click(function(){
            location.href = location.href;
        });
    });

    function check_form(){
        if($('input[name="smtp_server"]').val() == ''){
            showErrorMsg('邮件发送服务器不能为空!');
            $('input[name=smtp_server]').focus();
            return false;
        }
        if($('input[name="smtp_user"]').val() == '' || !checkEmail($('input[name="smtp_user"]').val())){
            showErrorMsg('邮箱账号的格式不正确!');
            $('input[name=smtp_user]').focus();
            return false;
        }
        if($('input[name="smtp_pwd"]').val() == ''){
            showErrorMsg('邮箱授权码不能为空!');
            $('input[name=smtp_pwd]').focus();
            return false;
        }
        if($('input[name="smtp_from_eamil"]').val() == ''){
            showErrorMsg('接收的邮件地址不能为空!');
            $('input[name=smtp_from_eamil]').focus();
            return false;
        }
        layer_loading('正在处理');
        $('#handlepost').submit();
    }

    function sendEmail() {
        var email = $('#smtp_from_eamil').val();
        if (email == '') {
            showErrorMsg('接收的邮件地址不能为空!');
            $('input[name=smtp_from_eamil]').focus();
            return false;
        } else {
            var loading = layer_loading('正在发送');
            $.ajax({
                type: "post",
                data: $('#handlepost').serialize(),
                dataType: 'json',
                url: "{:url('System/send_email', ['_ajax'=>1])}",
                success: function (res) {
                    layer.closeAll();
                    if (res.code == 1) {
                        layer.msg(res.msg, {icon: 1, time:1000});
                    } else {
                        layer.msg(res.msg, {icon: 2, time: 2000});
                    }
                },
                error: function(){
                    layer.closeAll();
                    layer.msg('发送超时,稍后重试~', {icon: 2, time: 1500});
                }
            })
        }
    }
</script>

{include file="public/footer" /}