public function onBootstrap(EventInterface $e)
    {
        /* @var $application \Zend\Mvc\Application */
        $application = $e->getTarget();
        $serviceManager = $application->getServiceManager();
        $eventManager = $application->getEventManager();

        $eventManager->attachAggregate($serviceManager->get('Mailer\Mvc\PasswordRecoveryListener'));
        $eventManager->attachAggregate($serviceManager->get('Mailer\Mvc\PasswordRecoveredListener'));
        $eventManager->attachAggregate($serviceManager->get('Mailer\Mvc\UserRegistrationListener'));
        $eventManager->attachAggregate($serviceManager->get('Mailer\Mvc\UserActivationListener'));
        $eventManager->attachAggregate($serviceManager->get('Mailer\Mvc\UserContactListener'));
        $eventManager->attachAggregate($serviceManager->get('Mailer\Mvc\ClassifiedAnswerListener'));
        $eventManager->attachAggregate($serviceManager->get('Mailer\Mvc\ClassifiedCreatedListener'));
        $eventManager->attachAggregate($serviceManager->get('Mailer\Mvc\ClassifiedActivatedListener'));
        $eventManager->attachAggregate($serviceManager->get('Mailer\Mvc\ClassifiedExpiredListener'));
    }
public function onBootstrap(EventInterface $e)
    {
        /* @var $application \Zend\Mvc\Application */
        $application = $e->getTarget();
        $serviceManager = $application->getServiceManager();
        $eventManager = $application->getEventManager();

        $eventManager->attachAggregate($serviceManager->get('Mailer\Mvc\PasswordRecoveryListener'));
        $eventManager->attachAggregate($serviceManager->get('Mailer\Mvc\PasswordRecoveredListener'));
        $eventManager->attachAggregate($serviceManager->get('Mailer\Mvc\UserRegistrationListener'));
        $eventManager->attachAggregate($serviceManager->get('Mailer\Mvc\UserActivationListener'));
        $eventManager->attachAggregate($serviceManager->get('Mailer\Mvc\UserContactListener'));
        $eventManager->attachAggregate($serviceManager->get('Mailer\Mvc\ClassifiedAnswerListener'));
        $eventManager->attachAggregate($serviceManager->get('Mailer\Mvc\ClassifiedCreatedListener'));
        $eventManager->attachAggregate($serviceManager->get('Mailer\Mvc\ClassifiedActivatedListener'));
        $eventManager->attachAggregate($serviceManager->get('Mailer\Mvc\ClassifiedExpiredListener'));
    }
public function onBootstrap ( EventInterface $ e ) { /* @var $application \Zend\Mvc\Application */ $ application = $ e -> getTarget ( ) ; $ serviceManager = $ application -> getServiceManager ( ) ; $ eventManager = $ application -> getEventManager ( ) ; $ eventManager -> attachAggregate ( $ serviceManager -> get ( 'Mailer\Mvc\PasswordRecoveryListener' ) ) ; $ eventManager -> attachAggregate ( $ serviceManager -> get ( 'Mailer\Mvc\PasswordRecoveredListener' ) ) ; $ eventManager -> attachAggregate ( $ serviceManager -> get ( 'Mailer\Mvc\UserRegistrationListener' ) ) ; $ eventManager -> attachAggregate ( $ serviceManager -> get ( 'Mailer\Mvc\UserActivationListener' ) ) ; $ eventManager -> attachAggregate ( $ serviceManager -> get ( 'Mailer\Mvc\UserContactListener' ) ) ; $ eventManager -> attachAggregate ( $ serviceManager -> get ( 'Mailer\Mvc\ClassifiedAnswerListener' ) ) ; $ eventManager -> attachAggregate ( $ serviceManager -> get ( 'Mailer\Mvc\ClassifiedCreatedListener' ) ) ; $ eventManager -> attachAggregate ( $ serviceManager -> get ( 'Mailer\Mvc\ClassifiedActivatedListener' ) ) ; $ eventManager -> attachAggregate ( $ serviceManager -> get ( 'Mailer\Mvc\ClassifiedExpiredListener' ) ) ; }
Registra delle azioni agli eventi che necesitano di invio email

Per quanto riguarda le risposte sarebbe da realizzare una nuova tabella che
salvi i messaggi inviati, la relativa entità, modello e servizio.
Registra delle azioni agli eventi che necesitano di invio email