From 4ae0876ba3ddf22c082edd251c8dff54daa4df38 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Tue, 29 Jul 2014 01:09:28 +0000 Subject: [PATCH] * finish task #1967. --- module/mail/lang/en.php | 1 + module/mail/lang/zh-cn.php | 1 + module/mail/model.php | 3 +++ 3 files changed, 5 insertions(+) diff --git a/module/mail/lang/en.php b/module/mail/lang/en.php index c1661e55c1..26396418d2 100755 --- a/module/mail/lang/en.php +++ b/module/mail/lang/en.php @@ -42,3 +42,4 @@ $lang->mail->content = 'If you can see this, the email notification featu $lang->mail->successSended = 'Successfully sended!'; $lang->mail->sendmailTips = 'Tips: system will not send mail to current user.'; $lang->mail->needConfigure = "I can not find the configuration, please configure it first."; +$lang->mail->nofsocket = 'The fsocket correlation function is disabled, not letter!'; diff --git a/module/mail/lang/zh-cn.php b/module/mail/lang/zh-cn.php index 55c0bd1efd..e1a47abffa 100755 --- a/module/mail/lang/zh-cn.php +++ b/module/mail/lang/zh-cn.php @@ -42,3 +42,4 @@ $lang->mail->content = '邮箱设置成功'; $lang->mail->successSended = '成功发送!'; $lang->mail->sendmailTips = '提示:系统不会为当前操作者发信。'; $lang->mail->needConfigure = '无法找到邮件配置信息,请先配置邮件发送参数。'; +$lang->mail->nofsocket = 'fsocket相关函数被禁用,不能发信!'; diff --git a/module/mail/model.php b/module/mail/model.php index 77d6ce94ed..7d0f7e3cea 100644 --- a/module/mail/model.php +++ b/module/mail/model.php @@ -243,6 +243,9 @@ class mailModel extends model { if(!$this->config->mail->turnon) return; + /* Task #1967. check the function of fsocket. */ + if(function_exists('fsockopen')) die(js::alert($this->lang->mail->nofsocket)); + ob_start(); $toList = $toList ? explode(',', str_replace(' ', '', $toList)) : array(); $ccList = $ccList ? explode(',', str_replace(' ', '', $ccList)) : array();