Download the PHP package zestic/communication-component without Composer
On this page you can find all versions of the php package zestic/communication-component. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download zestic/communication-component
More information about zestic/communication-component
Files in zestic/communication-component
Package communication-component
Short Description Communication component for Laminas using Symfony Messenger and Notifier
License MIT
Informations about the package communication-component
Communication Component
This component sends communications of any variety, email, sms, chat based on the user's preferences. Under the hood, it is using Symfony Notifier and Symfony Messenger.
Getting started
The simplest setup is to have an email sent to an SMTP channel. To set up the
configuration, add the following to config\config.php
Next, create communication.global.php
and set up a simple route.
If you don't set the from
address globally, you can also set it on a communication level.
In your .env file set the configuration for the email communication channel
// todo: set up a generic template
Now from the root of your project
The email should be delivered to you.
Using Messenger
To use Messenger to help handle the delivery of the emails simply update the communication.global.php
file.
This will default to using the Doctrine transport. If you want to change the transort, in your .env file add the transport.
Refer to the Symfony Messenger Transport Configuration documentation for more information on available transport configurations.
Once again run
The command will complete, however, if you check, you will not see the email in your inbox. That's because you need to start the message consumer. That is a pretty straight forward process.
This will start the consumer. Your test email will now be in your inbox.
See more information on how to set up your consumers in the Symfony Messenger documentation
Handling Failures
To get a list of the failed messages, run this command
You can see details about a specific failure
You can view and retry messages one-by-one
You can retry specific messages
You can retry all messages at once
You can also remove a message without retrying it
Future plans
- Some refactoring to decrease complexity
- Allow part of context to be overridden by the Recipient
All versions of communication-component with dependencies
iampersistent/config-value-component Version ^1.2
laminas/laminas-servicemanager Version ^4.0.0-rc1
mezzio/mezzio-twigrenderer Version ^2.6
netglue/laminas-messenger Version ^2.0
psr/container Version ^1.0 || ^2.0
symfony/dependency-injection Version ^5.3 || ^6.0
symfony/event-dispatcher Version ^5.3 || ^6.0
symfony/messenger Version ^5.3 || ^6.0
symfony/mailer Version ^5.3 || ^6.0
symfony/notifier Version ^5.3 || ^6.0
symfony/property-access Version ^5.3 || ^6.0
symfony/serializer Version ^5.3 || ^6.0
symfony/twig-bridge Version ^5.3 || ^6.0
twig/inky-extra Version ^3.1
twig/twig Version ^3.0