* finish task #2315.

This commit is contained in:
wangyidong
2015-08-26 14:37:01 +08:00
parent aac7b2ef5d
commit 0f79a4f998
4 changed files with 12 additions and 3 deletions

View File

@@ -7,7 +7,7 @@ $config->mail->smtp = new stdclass();
$config->mail->turnon = false; // trun on email feature or not. true|false
$config->mail->fromAddress = ''; // The from address.
$config->mail->fromName = 'zentao'; // The from name.
$config->mail->fromName = ''; // The from name.
$config->mail->mta = 'smtp'; // The send mail type.
$config->mail->smtp->debug = 0; // Debug level, 0,1,2.
$config->mail->smtp->charset = 'utf-8'; // Charset

View File

@@ -133,6 +133,12 @@ class mail extends control
$mailConfig->smtp->debug = $this->post->debug;
$mailConfig->smtp->charset = $this->post->charset;
if(empty($mailConfig->fromName))
{
echo js::alert(sprintf($this->lang->error->notempty, $this->lang->mail->fromName));
die(js::locate('back'));
}
/* The mail need openssl and curl extension when secure is tls. */
if($mailConfig->smtp->secure == 'tls')
{

View File

@@ -50,7 +50,7 @@ class mailModel extends model
/* Set default values. */
$config->mta = 'smtp';
$config->fromName = 'zentao';
$config->fromName = '';
$config->password = '';
$config->debug = 1;
$config->charset = 'utf-8';

View File

@@ -37,7 +37,10 @@ include '../../common/view/header.html.php';
</tr>
<tr>
<th><?php echo $lang->mail->fromName; ?></th>
<td><?php echo html::input('fromName', $mailConfig->fromName, "class='form-control'");?></td>
<td>
<div class='required required-wrapper'></div>
<?php echo html::input('fromName', $mailConfig->fromName, "class='form-control'");?>
</td>
</tr>
<tr>
<th><?php echo $lang->mail->host; ?></th>