Skip to content

Commit

Permalink
update mail
Browse files Browse the repository at this point in the history
  • Loading branch information
orvice committed Jan 17, 2016
1 parent 8a06a5b commit 43925d7
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion app/Services/Mail.php
Original file line number Diff line number Diff line change
Expand Up @@ -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){
Expand All @@ -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;
}
}

0 comments on commit 43925d7

Please sign in to comment.