From 280afa28ff90c83e9657ce6bcc56541867c3125e Mon Sep 17 00:00:00 2001 From: devil_gong Date: Wed, 12 Sep 2018 13:42:30 +0800 Subject: [PATCH] user --- .../Controller/CommonController.class.php | 1 - service/Application/Library/Email.class.php | 22 +++++++++++-------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/service/Application/Home/Controller/CommonController.class.php b/service/Application/Home/Controller/CommonController.class.php index 44f593454..ae88b2040 100755 --- a/service/Application/Home/Controller/CommonController.class.php +++ b/service/Application/Home/Controller/CommonController.class.php @@ -86,7 +86,6 @@ class CommonController extends Controller { $result['msg'] = L('common_operation_error'); } - ob_clean(); exit(json_encode($result)); } diff --git a/service/Application/Library/Email.class.php b/service/Application/Library/Email.class.php index 99c41fb78..7fe4c67f0 100755 --- a/service/Application/Library/Email.class.php +++ b/service/Application/Library/Email.class.php @@ -137,17 +137,21 @@ class Email // 邮件正文不支持HTML的备用显示 $this->obj->AltBody = strip_tags($param['content']); - // 发送邮件 - if($this->obj->Send()) - { - // 是否存在验证码 - if(!empty($param['code'])) + try { + // 发送邮件 + if($this->obj->Send()) { - $this->KindofSession($param['code']); + // 是否存在验证码 + if(!empty($param['code'])) + { + $this->KindofSession($param['code']); + } + return true; + } else { + $this->error = $this->obj->ErrorInfo; } - return true; - } else { - $this->error = $this->obj->ErrorInfo; + } catch(Exception $e) { + $this->error = $e->getMessage(); } return false; }