setUsername($config['username']); $transport->setPassword($config['password']); $transport->setStreamOptions($https); $set = new \Swift_Mailer($transport); // Set the mailer \Mail::setSymfonyTransport($set); return true; } catch (Exception $e) { loging('mail-config', $e->getMessage()); return $e->getMessage(); } } public function setMailGunDriver($config) { if (! $config) { return false; } return true; } }