Browse Source

Made mail config values configurable by .env file.

Martin Bean 9 years ago
parent
commit
4310e0b3ea
2 changed files with 6 additions and 5 deletions
  1. 1 0
      .env.example
  2. 5 5
      config/mail.php

+ 1 - 0
.env.example

@@ -8,4 +8,5 @@ DB_USERNAME=homestead
 DB_PASSWORD=secret
 
 CACHE_DRIVER=file
+MAIL_DRIVER=smtp
 SESSION_DRIVER=file

+ 5 - 5
config/mail.php

@@ -15,7 +15,7 @@ return [
 	|
 	*/
 
-	'driver' => 'smtp',
+	'driver' => env('MAIL_DRIVER', 'smtp'),
 
 	/*
 	|--------------------------------------------------------------------------
@@ -28,7 +28,7 @@ return [
 	|
 	*/
 
-	'host' => 'smtp.mailgun.org',
+	'host' => env('SMTP_HOST', 'smtp.mailgun.org'),
 
 	/*
 	|--------------------------------------------------------------------------
@@ -41,7 +41,7 @@ return [
 	|
 	*/
 
-	'port' => 587,
+	'port' => env('SMTP_PORT', 587),
 
 	/*
 	|--------------------------------------------------------------------------
@@ -80,7 +80,7 @@ return [
 	|
 	*/
 
-	'username' => null,
+	'username' => env('SMTP_USERNAME'),
 
 	/*
 	|--------------------------------------------------------------------------
@@ -93,7 +93,7 @@ return [
 	|
 	*/
 
-	'password' => null,
+	'password' => env('SMTP_PASSWORD'),
 
 	/*
 	|--------------------------------------------------------------------------