public static function send($to, $subject, $text) { $driver = Config::get("maildriver"); switch ($driver) { case "mailgun": $mail = new Mailgun(); $mail->send($to, $subject, $text); case "smtp": // @TODO smtp // @TODO smtp default: // @TODO default action } }
public static function send($to, $subject, $text) { $driver = Config::get("mailDriver"); switch ($driver) { case "mailgun": $mail = new Mailgun(); return $mail->send($to, $subject, $text); case "smtp": $mail = new Smtp(); return $mail->send($to, $subject, $text); default: // @TODO default action } return true; }