symfony-bundle zen-mail
ZenMail, admin send email
zenmail/zen-mail
ZenMail, admin send email
- Friday, February 13, 2015
- by mashware
- Repository
- 1 Watchers
- 0 Stars
- 3 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 1 Versions
- 0 % Grown
ZenMail
- Instalación
Implementar interface a tu clase usuario ZenMail\ZenCoreBundle\Adapter\Interfaces\ZenUserInterface
- Configuración
En config.yml:, (*1)
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, (*2)
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
*/
}
}
yml
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 }
, (*3)
- 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'
dev-master
9999999-dev
ZenMail, admin send email
Sources
Download
MIT
The Requires
The Development Requires
by
Alberto Vioque
mail
email
send email