1. Go to this page and download the library: Download knplabs/knp-mailjet-bundle library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
namespace Acme\DemoBundle\Listener;
use Knp\Bundle\MailjetBundle\Event\Listener\EventListenerInterface;
use Knp\Bundle\MailjetBundle\Event\Adapter\BlockedEvent;
use Knp\Bundle\MailjetBundle\Event\Adapter\BounceEvent;
// ...
class EventListener implements EventListenerInterface
{
public function onOpenEvent(OpenEvent $event)
{
// handle open events here
}
public function onSpamEvent(SpamEvent $event)
{
// handle close events here
}
// ...
}
// app/AppKernel.php
use Symfony\Component\HttpKernel\Kernel;
class AppKernel extends Kernel
{
public function registerBundles()
{
$bundles = array(
// ...
new Knp\Bundle\MailjetBundle\KnpMailjetBundle(),
);
}
}
bash
$ php composer.phar
bash
$ php composer.phar install
php composer.phar install --dev
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.