mirror of
https://github.com/appwrite/appwrite
synced 2026-05-23 08:58:35 +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
|
private function email(Document $provider): ?EmailAdapter
|
||||||
{
|
{
|
||||||
$credentials = $provider->getAttribute('credentials');
|
$credentials = $provider->getAttribute('credentials', []);
|
||||||
|
$options = $provider->getAttribute('options', []);
|
||||||
return match ($provider->getAttribute('provider')) {
|
return match ($provider->getAttribute('provider')) {
|
||||||
'mock' => new Mock('username', 'password'),
|
'mock' => new Mock('username', 'password'),
|
||||||
'smtp' => new SMTP(
|
'smtp' => new SMTP(
|
||||||
|
|
@ -416,9 +417,9 @@ class Messaging extends Action
|
||||||
$credentials['port'],
|
$credentials['port'],
|
||||||
$credentials['username'],
|
$credentials['username'],
|
||||||
$credentials['password'],
|
$credentials['password'],
|
||||||
$credentials['encryption'],
|
$options['encryption'],
|
||||||
$credentials['autoTLS'],
|
$options['autoTLS'],
|
||||||
$credentials['mailer'],
|
$options['mailer'],
|
||||||
),
|
),
|
||||||
'mailgun' => new Mailgun(
|
'mailgun' => new Mailgun(
|
||||||
$credentials['apiKey'],
|
$credentials['apiKey'],
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue