everlutionsk / sendin-blue-bundle
Everlution SendinBlue bundle for Symfony framework
Installs: 2 816
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 4
Forks: 1
Open Issues: 0
Type:everlution-bundle
Requires
- php: >=5.4.0
- everlutionsk/email-bundle-2: *
- mailin-api/mailin-api-php: 1.0.*
- symfony/config: >=2.5|>=3.0
- symfony/dependency-injection: >=2.5|>=3.0
- symfony/http-kernel: >=2.5|>=3.0
README
This Symfony bundle provides mail system for Email Bundle. Bundle uses SendinBlue transactional email platform.
Installation
composer require everlutionsk/sendin-blue-bundle
Enable the bundle
// app/AppKernel.php public function registerBundles() { return array( // ... new Everlution\EmailBundle\EverlutionEmailBundle(), new Everlution\SendinBlueBundle\EverlutionSendinBlueBundle(), ); }
Configure the bundle
Following configuration snippet describes how to configure the bundle.
Firstly, you must modify EmailBundle configuration to work with SendinBlueBundle's services.
# app/config/config.yml # EmailBundle Configuration everlution_email: domain_name: '%domain%' # example.com mail_system: everlution.sendin_blue.mail_system async_stream: everlution.email.stream.kernel_terminate request_processors: inbound: everlution.sendin_blue.inbound.request_processor outbound_message_event: everlution.sendin_blue.outbound.message_event.request_processor
Secondly, you must configure SendinBlueBundle itself
# app/config/config.yml # SendinBlueBundle Configuration everlution_sendin_blue: api_key: SECRET_API_KEY timeout: int|null
timeout - [Optional] Email timeout in ms, default is 30000 (max. 60000)
Usage
Message transformers
Mail system service provided by this bundle transform OutboundMessage into JSON and then POST this JSON to SendinBlue API. However, this JSON can be modified just before it is posted to SendinBlue. To do this you must create a service, which implements RawMessageTransformer interface and add following tag:
everlution.sendin_blue.outbound.raw_message_transformer
TODO
- Request Processors
- Request signature calculation
- Webhook keys configuration