* finish task #2618.

This commit is contained in:
wangyidong
2016-06-07 15:15:10 +08:00
parent 78ce4d3aeb
commit 21d6f08818
2 changed files with 3 additions and 0 deletions
+2
View File
@@ -58,12 +58,14 @@ class mail extends control
{
if($_POST)
{
set_time_limit(30);
$error = '';
if($this->post->fromAddress == false) $error = sprintf($this->lang->error->notempty, $this->lang->mail->fromAddress);
if(!validater::checkEmail($this->post->fromAddress)) $error .= '\n' . sprintf($this->lang->error->email, $this->lang->mail->fromAddress);
if($error) die(js::alert($error));
echo "<script>setTimeout(function(){parent.location.href='" . inlink('edit') . "'}, 10000)</script>";
$mailConfig = $this->mail->autoDetect($this->post->fromAddress);
$mailConfig->fromAddress = $this->post->fromAddress;
$this->session->set('mailConfig', $mailConfig);
+1
View File
@@ -144,6 +144,7 @@ class mailModel extends model
if(!$connection) return false;
fclose($connection);
$config = new stdclass();
$config->username = $username;
$config->host = $host;
$config->auth = 1;