Provides Mailomat integration for Symfony 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
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