This commit is contained in:
paulwer 2024-03-17 08:43:40 +01:00
parent e443fb28ec
commit 522fbea475
4 changed files with 255 additions and 241 deletions

View File

@ -336,6 +336,10 @@ class NinjaMailerJob implements ShouldQueue
$this->mailer = 'mailgun'; $this->mailer = 'mailgun';
$this->setMailgunMailer(); $this->setMailgunMailer();
return $this; return $this;
case 'client_brevo':
$this->mailer = 'brevo';
$this->setBrevoMailer();
return $this;
case 'smtp': case 'smtp':
$this->mailer = 'smtp'; $this->mailer = 'smtp';
$this->configureSmtpMailer(); $this->configureSmtpMailer();

View File

@ -130,18 +130,20 @@ class AppServiceProvider extends ServiceProvider
) )
); );
}); });
// Mailer::macro('brevo_config', function (string $key) { Mailer::macro('brevo_config', function (string $brevo_key) {
// // @phpstan-ignore /** @phpstan-ignore-next-line **/ // @phpstan-ignore /** @phpstan-ignore-next-line **/
// Mail::setSymfonyTransport((new BrevoTransportFactory)->create( Mailer::setSymfonyTransport(
// new Dsn( (new BrevoTransportFactory)->create(
// 'brevo+api', new Dsn(
// 'default', 'brevo+api',
// $key 'default',
// ) $brevo_key
// )); )
)
);
// return $this; return $this;
// }); });
} }

View File

@ -564,6 +564,10 @@ class Email implements ShouldQueue
$this->mailer = 'mailgun'; $this->mailer = 'mailgun';
$this->setMailgunMailer(); $this->setMailgunMailer();
return $this; return $this;
case 'client_brevo':
$this->mailer = 'brevo';
$this->setBrevoMailer();
return $this;
case 'smtp': case 'smtp':
$this->mailer = 'smtp'; $this->mailer = 'smtp';
$this->configureSmtpMailer(); $this->configureSmtpMailer();

430
composer.lock generated

File diff suppressed because it is too large Load Diff