kohana email
1.0.0
Modul email yang kompatibel dengan Kohana 3.3 dan Koseven menggunakan SwiftMailer atau PHPMailer.
composer install
APPPATH/bootstrap.php
: Kohana:: modules ( array (
...
' email ' => MODPATH . ' email ' ,
...
));
composer require svenbw/kohana-email:dev-master
APPPATH/bootstrap.php
jika belum: require DOCROOT . ' /vendor/autoload.php ' ;
Kohana:: modules ( array (
...
' email ' => DOCROOT . ' /vendor/svenbw/kohana-email ' ,
...
));
Kirim pesan ke penerima
$ mailer = Email:: connect ();
$ mailer -> send (
array ( ' [email protected] ' , ' To recipient ' ),
array ( ' [email protected] ' , ' The sender ' ),
' Test-email ' ,
' <i>Test email</i> ' ,
TRUE );
Dimungkinkan untuk membuat pesan dengan panggilan berantai.
$ mailer = Email:: factory ();
$ mailer
-> to ( ' [email protected] ' , ' To recipient ' )
-> from ( ' [email protected] ' , ' The sender ' )
-> subject ( ' Test-email ' )
-> html ( ' <i>Test email body</i> ' )
-> send ();