From 43925d7077d6e7e3d1d767fe94e14c55dde85611 Mon Sep 17 00:00:00 2001 From: orvice Date: Mon, 18 Jan 2016 01:41:34 +0800 Subject: [PATCH] update mail --- app/Services/Mail.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/app/Services/Mail.php b/app/Services/Mail.php index 9db150af2..742b7ac53 100755 --- a/app/Services/Mail.php +++ b/app/Services/Mail.php @@ -11,7 +11,12 @@ class Mail { - + /*** + * @param $to + * @param $subject + * @param $text + * @return bool + */ public static function send($to,$subject,$text){ $driver = Config::get("maildriver"); switch ($driver){ @@ -26,5 +31,11 @@ public static function send($to,$subject,$text){ default: // @TODO default action } + try{ + $driver->send($to,$subject,$text); + }catch (Exception $e){ + return false; + } + return true; } } \ No newline at end of file