generated from spatie/package-skeleton-laravel
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The Laravel mail configuration defines a global from address by default, see https://github.com/laravel/laravel/blob/0993d09dc8206d0933628074036427344be16fc5/config/mail.php#L100-L114. Thus, I think it is unnecessary and redundant to force users of this package to repeat this setting specifically for the `microsoft-graph` mailer.
- Loading branch information
Showing
3 changed files
with
13 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,13 +18,13 @@ | |
'client_id' => 'foo_client_id', | ||
'client_secret' => 'foo_client_secret', | ||
'tenant_id' => 'foo_tenant_id', | ||
'from' => [ | ||
'address' => '[email protected]', | ||
'name' => 'Taylor Otwell', | ||
], | ||
'save_to_sent_items' => null, | ||
]); | ||
Config::set('mail.default', 'microsoft-graph'); | ||
Config::set('mail.from', [ | ||
'address' => '[email protected]', | ||
'name' => 'Taylor Otwell', | ||
]); | ||
|
||
Cache::set('microsoft-graph-api-access-token', 'foo_access_token', 3600); | ||
|
||
|
@@ -105,12 +105,12 @@ | |
'client_id' => 'foo_client_id', | ||
'client_secret' => 'foo_client_secret', | ||
'tenant_id' => 'foo_tenant_id', | ||
'from' => [ | ||
'address' => '[email protected]', | ||
'name' => 'Taylor Otwell', | ||
], | ||
]); | ||
Config::set('mail.default', 'microsoft-graph'); | ||
Config::set('mail.from', [ | ||
'address' => '[email protected]', | ||
'name' => 'Taylor Otwell', | ||
]); | ||
|
||
Cache::set('microsoft-graph-api-access-token', 'foo_access_token', 3600); | ||
|
||
|
@@ -191,10 +191,6 @@ | |
'client_id' => 'foo_client_id', | ||
'client_secret' => 'foo_client_secret', | ||
'tenant_id' => 'foo_tenant_id', | ||
'from' => [ | ||
'address' => '[email protected]', | ||
'name' => 'Taylor Otwell', | ||
], | ||
]); | ||
Config::set('mail.default', 'microsoft-graph'); | ||
|
||
|
@@ -227,10 +223,6 @@ | |
'client_id' => 'foo_client_id', | ||
'client_secret' => 'foo_client_secret', | ||
'tenant_id' => 'foo_tenant_id', | ||
'from' => [ | ||
'address' => '[email protected]', | ||
'name' => 'Taylor Otwell', | ||
], | ||
]); | ||
Config::set('mail.default', 'microsoft-graph'); | ||
|
||
|
@@ -247,17 +239,13 @@ | |
Config::set('mail.default', 'microsoft-graph'); | ||
|
||
expect(fn () => Mail::to('[email protected]')->send(new TestMail(false))) | ||
->toThrow(get_class($exception), $exception->getMessage()); | ||
->toThrow($exception); | ||
})->with([ | ||
[ | ||
[ | ||
'transport' => 'microsoft-graph', | ||
'client_id' => 'foo_client_id', | ||
'client_secret' => 'foo_client_secret', | ||
'from' => [ | ||
'address' => '[email protected]', | ||
'name' => 'Taylor Otwell', | ||
], | ||
], | ||
new ConfigurationMissing('tenant_id'), | ||
], | ||
|
@@ -267,10 +255,6 @@ | |
'tenant_id' => 123, | ||
'client_id' => 'foo_client_id', | ||
'client_secret' => 'foo_client_secret', | ||
'from' => [ | ||
'address' => '[email protected]', | ||
'name' => 'Taylor Otwell', | ||
], | ||
], | ||
new ConfigurationInvalid('tenant_id', 123), | ||
], | ||
|
@@ -279,10 +263,6 @@ | |
'transport' => 'microsoft-graph', | ||
'tenant_id' => 'foo_tenant_id', | ||
'client_secret' => 'foo_client_secret', | ||
'from' => [ | ||
'address' => '[email protected]', | ||
'name' => 'Taylor Otwell', | ||
], | ||
], | ||
new ConfigurationMissing('client_id'), | ||
], | ||
|
@@ -292,10 +272,6 @@ | |
'tenant_id' => 'foo_tenant_id', | ||
'client_id' => '', | ||
'client_secret' => 'foo_client_secret', | ||
'from' => [ | ||
'address' => '[email protected]', | ||
'name' => 'Taylor Otwell', | ||
], | ||
], | ||
new ConfigurationInvalid('client_id', ''), | ||
], | ||
|
@@ -304,10 +280,6 @@ | |
'transport' => 'microsoft-graph', | ||
'tenant_id' => 'foo_tenant_id', | ||
'client_id' => 'foo_client_id', | ||
'from' => [ | ||
'address' => '[email protected]', | ||
'name' => 'Taylor Otwell', | ||
], | ||
], | ||
new ConfigurationMissing('client_secret'), | ||
], | ||
|
@@ -317,33 +289,16 @@ | |
'tenant_id' => 'foo_tenant_id', | ||
'client_id' => 'foo_client_id', | ||
'client_secret' => null, | ||
'from' => [ | ||
'address' => '[email protected]', | ||
'name' => 'Taylor Otwell', | ||
], | ||
], | ||
new ConfigurationInvalid('client_secret', null), | ||
], | ||
[ | ||
[ | ||
'transport' => 'microsoft-graph', | ||
'tenant_id' => 'foo_tenant_id', | ||
'client_id' => 'foo_client_id', | ||
'client_secret' => 'foo_client_secret', | ||
], | ||
new ConfigurationMissing('from.address'), | ||
], | ||
[ | ||
[ | ||
'transport' => 'microsoft-graph', | ||
'tenant_id' => 'foo_tenant_id', | ||
'client_id' => 'foo_client_id', | ||
'client_secret' => 'foo_client_secret', | ||
'access_token_ttl' => false, | ||
'from' => [ | ||
'address' => '[email protected]', | ||
'name' => 'Taylor Otwell', | ||
], | ||
], | ||
new ConfigurationInvalid('access_token_ttl', false), | ||
], | ||
|
@@ -355,10 +310,10 @@ | |
'client_id' => 'foo_client_id', | ||
'client_secret' => 'foo_client_secret', | ||
'tenant_id' => 'foo_tenant_id', | ||
'from' => [ | ||
'address' => '[email protected]', | ||
'name' => 'Taylor Otwell', | ||
], | ||
]); | ||
Config::set('mail.from', [ | ||
'address' => '[email protected]', | ||
'name' => 'Taylor Otwell', | ||
]); | ||
Config::set('mail.default', 'microsoft-graph'); | ||
Config::set('filesystems.default', 'local'); | ||
|
@@ -438,10 +393,6 @@ | |
'client_id' => 'foo_client_id', | ||
'client_secret' => 'foo_client_secret', | ||
'tenant_id' => 'foo_tenant_id', | ||
'from' => [ | ||
'address' => '[email protected]', | ||
'name' => 'Taylor Otwell', | ||
], | ||
]); | ||
Config::set('mail.default', 'microsoft-graph'); | ||
|
||
|