diff --git a/module/mail/config.php b/module/mail/config.php index f1c38305b2..2fbfa040cb 100644 --- a/module/mail/config.php +++ b/module/mail/config.php @@ -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 diff --git a/module/mail/control.php b/module/mail/control.php index 06eaa22ee2..9ab4e3371d 100755 --- a/module/mail/control.php +++ b/module/mail/control.php @@ -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') { diff --git a/module/mail/model.php b/module/mail/model.php index bd62d413ba..0b76444e09 100644 --- a/module/mail/model.php +++ b/module/mail/model.php @@ -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'; diff --git a/module/mail/view/edit.html.php b/module/mail/view/edit.html.php index 82f9d1fac3..ae5a27a773 100755 --- a/module/mail/view/edit.html.php +++ b/module/mail/view/edit.html.php @@ -37,7 +37,10 @@ include '../../common/view/header.html.php'; mail->fromName; ?> - fromName, "class='form-control'");?> + +
+ fromName, "class='form-control'");?> + mail->host; ?>