* finish task #2315.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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')
|
||||
{
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user