symfony / mailomat-mailer
Symfony Mailomat Mailer Bridge
Fund package maintenance!
fabpot
Tidelift
symfony.com/sponsor
Installs: 23
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 2
Forks: 0
Type:symfony-mailer-bridge
Requires
- php: >=8.2
- symfony/mailer: ^7.2
Requires (Dev)
- symfony/http-client: ^6.4|^7.0
- symfony/http-foundation: ^7.1
- symfony/webhook: ^6.4|^7.0
Conflicts
- symfony/http-foundation: <7.1
This package is auto-updated.
Last update: 2024-11-29 09:06:49 UTC
README
Provides Mailomat integration for Symfony Mailer.
Mailer
Configuration example:
# .env.local # SMTP MAILER_DSN=mailomat+smtp://USERNAME:PASSWORD@default # API MAILER_DSN=mailomat+api://KEY@default
Where:
USERNAME
is your Mailomat SMTP username (must use your full email address)PASSWORD
is your Mailomat SMTP passwordKEY
is your Mailomat API key
Webhook
Create a route:
framework: webhook: routing: mailomat: service: mailer.webhook.request_parser.mailomat secret: '%env(WEBHOOK_MAILOMAT_SECRET)%'
The configuration:
# .env.local WEBHOOK_MAILOMAT_SECRET=your-mailomat-webhook-secret
And a consumer:
#[\Symfony\Component\RemoteEvent\Attribute\AsRemoteEventConsumer(name: 'mailomat')] class MailomatConsumer implements ConsumerInterface { public function consume(AbstractMailerEvent $event): void { // your code } }
Where:
WEBHOOK_MAILOMAT_SECRET
is your Mailomat Webhook secret