diff --git a/config/services.yaml b/config/services.yaml index 53b95eb..cbb7e22 100644 --- a/config/services.yaml +++ b/config/services.yaml @@ -67,10 +67,6 @@ services: $termsAndConditionsUrl: '%terms_and_conditions_url%' $logger: '@monolog.logger.core' $environment: '%kernel.environment%' - $mailjetApiKey: '%env(default::MAILJET_API_KEY)%' - $mailjetApiSecret: '%env(default::MAILJET_API_SECRET)%' - $mailjetApiBaseUrl: '%env(default::MAILJET_API_BASE_URL)%' - $mailjetNewsletterListId: '%env(default::MAILJET_NEWSLETTER_LIST_ID)%' # makes classes in src/ available to be used as services # this creates a service per class whose id is the fully-qualified class name @@ -191,3 +187,10 @@ services: $defaults: from: '%default_email_from%' to: '%default_email_to%' + + App\Service\MailjetApiClient: + arguments: + $mailjetApiKey: '%env(default::MAILJET_API_KEY)%' + $mailjetApiSecret: '%env(default::MAILJET_API_SECRET)%' + $mailjetApiBaseUrl: '%env(default::MAILJET_API_BASE_URL)%' + $mailjetNewsletterListId: '%env(default::MAILJET_NEWSLETTER_LIST_ID)%'