dzzoffice/admin/setting/mailcheck.php
小胡 4bc8ee6f49
修复部分情况下无法正常更新用户状态信息问题 (#290)
* 更新内容:
1.條复网盘应用移动端部分情况下目录权限不正确问题
2.修复一些已知问题
3. 优化btn按钮交互效果
4.升级1avui至v2.9.23版本

* 修复一些已知问题
2025-02-26 17:14:24 +08:00

43 lines
1.6 KiB
PHP

<?php
/*
* @copyright Leyun internet Technology(Shanghai)Co.,Ltd
* @license http://www.dzzoffice.com/licenses/license.txt
* @package DzzOffice
* @link http://www.dzzoffice.com
* @author zyx(zyx@dzz.cc)
*/
if(!defined('IN_DZZ') || !defined('IN_ADMIN')) {
exit('Access Denied');
}
if(!submitcheck('mailchecksubmit')) {
$op = isset($_GET['op']) ? $_GET['op'] : '';
$navtitle=lang('email_send_test').' - '.lang('appname');
include template('mailcheck');
exit();
}else{
if(!is_array($_G['setting']['mail'])) {
$_G['setting']['mail'] = dunserialize($_G['setting']['mail']);
}
$test_to = $_GET['test_to'];
$test_from = $_GET['test_from'];
$date = date('Y-m-d H:i:s');
$alertmsg = '';
$title = lang('setting_mail_check_title_'.$_G['setting']['mail']['mailsend']);
$message = lang('setting_mail_check_message_'.$_G['setting']['mail']['mailsend']).' '.$test_from.lang('setting_mail_check_date').' '.$date;
$_G['setting']['bbname'] = lang('setting_mail_check_method_1');
include libfile('function/mail');
$succeed = sendmail($test_to, $title.' @ '.$date, $_G['setting']['bbname']."\n\n\n$message", $test_from);
$_G['setting']['bbname'] = lang('setting_mail_check_method_2');
$succeed = sendmail($test_to, $title.' @ '.$date, $_G['setting']['bbname']."\n\n\n$message", $test_from);
if($succeed) {
$alertmsg = lang('setting_mail_check_success_1')."$title @ $date".lang('setting_mail_check_success_2');
} else {
$alertmsg = lang('setting_mail_check_error').$alertmsg;
}
echo '<script language="javascript">alert(\''.str_replace(array('\'', "\n", "\r"), array('\\\'', '\n', ''), $alertmsg).'\');</script>';
}
?>