Skip to content

Commit cc09679

Browse files
committed
Merge pull request laravel#3269 from martinbean/set-mail-defaults
[5.0] Set mail config values in .env file.
2 parents 7a5a5c7 + 4310e0b commit cc09679

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ DB_USERNAME=homestead
88
DB_PASSWORD=secret
99

1010
CACHE_DRIVER=file
11+
MAIL_DRIVER=smtp
1112
SESSION_DRIVER=file

config/mail.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
|
1616
*/
1717

18-
'driver' => 'smtp',
18+
'driver' => env('MAIL_DRIVER', 'smtp'),
1919

2020
/*
2121
|--------------------------------------------------------------------------
@@ -28,7 +28,7 @@
2828
|
2929
*/
3030

31-
'host' => 'smtp.mailgun.org',
31+
'host' => env('SMTP_HOST', 'smtp.mailgun.org'),
3232

3333
/*
3434
|--------------------------------------------------------------------------
@@ -41,7 +41,7 @@
4141
|
4242
*/
4343

44-
'port' => 587,
44+
'port' => env('SMTP_PORT', 587),
4545

4646
/*
4747
|--------------------------------------------------------------------------
@@ -80,7 +80,7 @@
8080
|
8181
*/
8282

83-
'username' => null,
83+
'username' => env('SMTP_USERNAME'),
8484

8585
/*
8686
|--------------------------------------------------------------------------
@@ -93,7 +93,7 @@
9393
|
9494
*/
9595

96-
'password' => null,
96+
'password' => env('SMTP_PASSWORD'),
9797

9898
/*
9999
|--------------------------------------------------------------------------

0 commit comments

Comments
 (0)