feat: MailJet list handling with DOI, webhook receiver and API endpoint
addresses #869cut134
This commit is contained in:
@@ -24,6 +24,7 @@ framework:
|
||||
Symfony\Component\Mailer\Messenger\SendEmailMessage: sync
|
||||
Symfony\Component\Notifier\Message\ChatMessage: async
|
||||
Symfony\Component\Notifier\Message\SmsMessage: async
|
||||
App\Message\MailjetNewsletterEventMessage: async
|
||||
|
||||
# Route your messages to the transports
|
||||
# 'App\Message\YourMessage': async
|
||||
|
||||
@@ -8,6 +8,12 @@ security:
|
||||
entity:
|
||||
class: App\Entity\User
|
||||
property: email
|
||||
mailjet_webhook_provider:
|
||||
memory:
|
||||
users:
|
||||
mailjet:
|
||||
password: '%env(MAILJET_WEBHOOK_BASIC_PASSWORD_HASH)%'
|
||||
roles: ['ROLE_MAILJET_WEBHOOK']
|
||||
firewalls:
|
||||
dev:
|
||||
pattern: ^/(_(profiler|wdt)|css|images|js)/
|
||||
@@ -19,7 +25,15 @@ security:
|
||||
pattern: ^/api
|
||||
security: true
|
||||
stateless: true
|
||||
provider: app_user_provider
|
||||
oauth2: true
|
||||
mailjet_webhook:
|
||||
pattern: ^/webhooks/mailjet/newsletter$
|
||||
security: true
|
||||
stateless: true
|
||||
provider: mailjet_webhook_provider
|
||||
http_basic:
|
||||
realm: 'Mailjet Webhook'
|
||||
main:
|
||||
lazy: true
|
||||
provider: app_user_provider
|
||||
@@ -32,6 +46,7 @@ security:
|
||||
# Easy way to control access for large sections of your site
|
||||
# Note: Only the *first* access control that matches will be used
|
||||
access_control:
|
||||
- { path: ^/webhooks/mailjet/newsletter$, roles: ROLE_MAILJET_WEBHOOK, requires_channel: https }
|
||||
- { path: ^/authorize, roles: IS_AUTHENTICATED_REMEMBERED, requires_channel: https }
|
||||
- { path: ^/admin, roles: ROLE_ADMIN, requires_channel: https }
|
||||
- { path: ^/, roles: PUBLIC_ACCESS, requires_channel: https }
|
||||
|
||||
+31
-4
@@ -14,6 +14,26 @@ parameters:
|
||||
default_email_from: '%env(APP_DEFAULT_EMAIL_FROM)%'
|
||||
default_email_to: '%env(APP_DEFAULT_EMAIL_TO)%'
|
||||
|
||||
# MailJet list ids and their labels
|
||||
mailjet_lists:
|
||||
10321569: 'E&P Newsletter'
|
||||
10321382: 'Reisen-Alert Ahrntal'
|
||||
10321383: 'Reisen-Alert Davos'
|
||||
10321391: 'Reisen-Alert Familienreisen'
|
||||
10321384: 'Reisen-Alert Arosa-Lenzerheide'
|
||||
10321385: 'Reisen-Alert Les Deux Alpes'
|
||||
10321386: 'Reisen-Alert Montafon'
|
||||
10321387: 'Reisen-Alert Portes du Soleil'
|
||||
10321388: 'Reisen-Alert Saalbach-Hinterglemm'
|
||||
10538809: 'Reisen-Alert Scuol'
|
||||
10321389: 'Reisen-Alert Stubaital'
|
||||
10321390: 'Reisen-Alert Val Thorens'
|
||||
|
||||
# MailJet contact metadata names for name synchronization
|
||||
mailjet_contact_metadata_fields:
|
||||
firstName: 'vorname'
|
||||
lastName: 'nachname'
|
||||
|
||||
# Body dimensions choices for BodyDimensionsType
|
||||
body_dimensions.height_choices:
|
||||
'bis 148cm': '-148'
|
||||
@@ -218,6 +238,12 @@ services:
|
||||
App\Service\NewsletterManager:
|
||||
arguments:
|
||||
$newsletterConfirmationTtlHours: '%newsletter_confirmation_ttl_hours%'
|
||||
$mailjetLists: '%mailjet_lists%'
|
||||
$defaultMailjetListId: '%env(default::MAILJET_DEFAULT_LIST_ID)%'
|
||||
|
||||
App\Controller\Api\NewsletterSubscriptionController:
|
||||
arguments:
|
||||
$mailjetLists: '%mailjet_lists%'
|
||||
|
||||
App\Service\DomainConfigProvider:
|
||||
arguments:
|
||||
@@ -231,7 +257,8 @@ services:
|
||||
|
||||
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)%'
|
||||
$apiKey: '%env(default::MAILJET_API_KEY)%'
|
||||
$apiSecret: '%env(default::MAILJET_API_SECRET)%'
|
||||
$apiBaseUrl: '%env(default::MAILJET_API_BASE_URL)%'
|
||||
$defaultListId: '%env(default::MAILJET_DEFAULT_LIST_ID)%'
|
||||
$contactMetadataFields: '%mailjet_contact_metadata_fields%'
|
||||
|
||||
Reference in New Issue
Block a user