mirror of
https://github.com/appwrite/appwrite
synced 2026-05-06 14:58:33 +00:00
Fix adapter instantiation
This commit is contained in:
parent
21f0ce5b82
commit
836ae8a607
1 changed files with 5 additions and 4 deletions
|
|
@ -408,7 +408,8 @@ class Messaging extends Action
|
|||
|
||||
private function email(Document $provider): ?EmailAdapter
|
||||
{
|
||||
$credentials = $provider->getAttribute('credentials');
|
||||
$credentials = $provider->getAttribute('credentials', []);
|
||||
$options = $provider->getAttribute('options', []);
|
||||
return match ($provider->getAttribute('provider')) {
|
||||
'mock' => new Mock('username', 'password'),
|
||||
'smtp' => new SMTP(
|
||||
|
|
@ -416,9 +417,9 @@ class Messaging extends Action
|
|||
$credentials['port'],
|
||||
$credentials['username'],
|
||||
$credentials['password'],
|
||||
$credentials['encryption'],
|
||||
$credentials['autoTLS'],
|
||||
$credentials['mailer'],
|
||||
$options['encryption'],
|
||||
$options['autoTLS'],
|
||||
$options['mailer'],
|
||||
),
|
||||
'mailgun' => new Mailgun(
|
||||
$credentials['apiKey'],
|
||||
|
|
|
|||
Loading…
Reference in a new issue