mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 16:14:03 +00:00
Add separate method to pick the appropriate mail credentials map preset
This commit is contained in:
parent
6d464a19b7
commit
9116ffc792
1 changed files with 6 additions and 3 deletions
|
|
@ -34,12 +34,15 @@ class MailTenancyBootstrapper implements TenancyBootstrapper
|
|||
|
||||
public function __construct(protected Repository $config)
|
||||
{
|
||||
$mapPreset = match ($config->get('mail.default')) {
|
||||
static::$credentialsMap = array_merge(static::$credentialsMap, $this->pickMapPreset() ?? []);
|
||||
}
|
||||
|
||||
protected function pickMapPreset(): array|null
|
||||
{
|
||||
return match ($this->config->get('mail.default')) {
|
||||
'smtp' => static::smtpCredentialsMap(),
|
||||
default => null,
|
||||
};
|
||||
|
||||
static::$credentialsMap = array_merge(static::$credentialsMap, $mapPreset ?? []);
|
||||
}
|
||||
|
||||
public function bootstrap(Tenant $tenant): void
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue