kohana email
1.0.0
Módulo de correo electrónico compatible con Kohana 3.3 y Koseven usando SwiftMailer o PHPMailer.
composer install
APPPATH/bootstrap.php
: Kohana:: modules ( array (
...
' email ' => MODPATH . ' email ' ,
...
));
composer require svenbw/kohana-email:dev-master
APPPATH/bootstrap.php
si aún no lo ha hecho: require DOCROOT . ' /vendor/autoload.php ' ;
Kohana:: modules ( array (
...
' email ' => DOCROOT . ' /vendor/svenbw/kohana-email ' ,
...
));
Enviar un mensaje a un destinatario
$ mailer = Email:: connect ();
$ mailer -> send (
array ( ' [email protected] ' , ' To recipient ' ),
array ( ' [email protected] ' , ' The sender ' ),
' Test-email ' ,
' <i>Test email</i> ' ,
TRUE );
Es posible crear un mensaje con llamadas encadenadas.
$ mailer = Email:: factory ();
$ mailer
-> to ( ' [email protected] ' , ' To recipient ' )
-> from ( ' [email protected] ' , ' The sender ' )
-> subject ( ' Test-email ' )
-> html ( ' <i>Test email body</i> ' )
-> send ();