zenmail / zen-mail
ZenMail, admin send email
Installs: 3
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=5.3.3
- doctrine/doctrine-bundle: ~1.2
- doctrine/orm: ~2.2,>=2.2.3
- incenteev/composer-parameter-handler: ~2.0
- mmoreram/simple-doctrine-mapping: dev-master
- sensio/distribution-bundle: ~3.0.12
- sensio/framework-extra-bundle: ~3.0
- symfony/assetic-bundle: ~2.3
- symfony/event-dispatcher: >=2.2.3
- symfony/monolog-bundle: ~2.4
- symfony/swiftmailer-bundle: ~2.3
- symfony/symfony: 2.6.*
- twig/extensions: ~1.0
Requires (Dev)
Replaces
- zenmail/zen-core-bundle: dev-master
- zenmail/zen-list-bundle: dev-master
- zenmail/zen-swift-adapter-bundle: dev-master
This package is auto-updated.
Last update: 2024-11-29 04:14:22 UTC
README
- Instalación
Implementar interface a tu clase usuario
ZenMail\ZenCoreBundle\Adapter\Interfaces\ZenUserInterface
- Configuración En config.yml:
parameters: #Si usas otro sistema de correo aquí deberas cambiar por el que te diga ese bundle. zen_mailer_adapter: zen_swift_mailer_adapter
- Eventos
Servicios:
Para los eventos pre y post send debes crear un listener pare ello
use ZenMail\ZenCoreBundle\Event\ZenPreSendMailEvent; use ZenMail\ZenCoreBundle\Event\ZenPostSendMailEvent; class ZenMail { /** * @param ZenPreSendMailEvent $zenPreSendMailEvent */ public function onZenPreSendMail(ZenPreSendMailEvent $zenPreSendMailEvent) { /* * Your code for this event */ } /** * @param ZenPostSendMailEvent $zenPostSendMailEvent */ public function onZenPostSendMail(ZenPostSendMailEvent $zenPostSendMailEvent){ /* * Your code for this event */ } }
zen_mail.send: class: AppBundle\EventListener\ZenMail tags: - { name: kernel.event_listener, event: zen.pre.send.mail, method: onZenPreSendMail } - { name: kernel.event_listener, event: zen.post.send.mail, method: onZenPostSendMail }
- Adapters
Si vas a crear un adapter deberás crear dos:
- Mailer: En este se adapta el envio de Zen Mail con el tuyo, para eso tienes implementar 'ZenMail\ZenCoreBundle\Adapter\Interfaces\ZenMailerInterface'
- Message: En este se adapta el mensaje que se enviará con el de Zen Mail, para ello tienes que implementar 'ZenMail\ZenCoreBundle\Adapter\Interfaces\ZenMessageInterface'