* finish task #2142.
This commit is contained in:
@@ -132,6 +132,21 @@ class mail extends control
|
||||
$mailConfig->smtp->debug = $this->post->debug;
|
||||
$mailConfig->smtp->charset = $this->post->charset;
|
||||
|
||||
/* The mail need openssl and curl extension when secure is tls. */
|
||||
if($mailConfig->smtp->secure == 'tls')
|
||||
{
|
||||
if(!extension_loaded('openssl'))
|
||||
{
|
||||
echo js::alert($this->lang->mail->noOpenssl);
|
||||
die(js::locate('back'));
|
||||
}
|
||||
if(!extension_loaded('curl'))
|
||||
{
|
||||
echo js::alert($this->lang->mail->noCurl);
|
||||
die(js::locate('back'));
|
||||
}
|
||||
}
|
||||
|
||||
$this->loadModel('setting')->setItems('system.mail', $mailConfig);
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
|
||||
|
||||
@@ -42,4 +42,6 @@ $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! Please enlarge the setting of allow_url_fopen to On in php.ini and open the extension of openssl. Restart apace.';
|
||||
$lang->mail->nofsocket = 'The fsocket correlation function is disabled, not letter! Please enlarge the setting of allow_url_fopen to On in php.ini and open the extension of openssl. Restart apache.';
|
||||
$lang->mail->noOpenssl = 'Please open the extension of openssl when use tls. Restart apache.';
|
||||
$lang->mail->noCurl = 'Please open the extension of curl when use tls. Restart apache.';
|
||||
|
||||
@@ -43,3 +43,5 @@ $lang->mail->successSended = '成功发送!';
|
||||
$lang->mail->sendmailTips = '提示:系统不会为当前操作者发信。';
|
||||
$lang->mail->needConfigure = '无法找到邮件配置信息,请先配置邮件发送参数。';
|
||||
$lang->mail->nofsocket = 'fsocket相关函数被禁用,不能发信!请在php.ini中修改allow_url_fopen为On,打开openssl扩展。 保存并重新启动apache。';
|
||||
$lang->mail->noOpenssl = 'tls加密,请打开openssl扩展。 保存并重新启动apache。';
|
||||
$lang->mail->noCurl = 'tls加密,请打开curl扩展。 保存并重新启动apache。';
|
||||
|
||||
Reference in New Issue
Block a user