svenbw / kohana-email
Email module for Koseven
Installs: 1 507
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 2
Forks: 2
Open Issues: 0
Requires
- phpmailer/phpmailer: ^5.2
- swiftmailer/swiftmailer: ^5.4
This package is not auto-updated.
Last update: 2025-05-11 09:22:35 UTC
README
Kohana 3.3 and Koseven compatible email module using SwiftMailer or PHPMailer.
How to install
Direct download method
- Download to modules directory.
- Fetch dependencies:
composer install
- Include it in
APPPATH/bootstrap.php
modules list:
Kohana::modules(array( ... 'email' => MODPATH.'email', ... ));
Composer module method
- Include with composer:
composer require svenbw/kohana-email:dev-master
- Enable vendor autoload in
APPPATH/bootstrap.php
if not already:
require DOCROOT.'/vendor/autoload.php';
- In the same file include it in your modules list:
Kohana::modules(array( ... 'email' => DOCROOT.'/vendor/svenbw/kohana-email', ... ));
Usage
Send a message to a recipient
$mailer = Email::connect(); $mailer->send( array('to-recipient@example.com', 'To recipient'), array('the-sender@example.com', 'The sender'), 'Test-email', '<i>Test email</i>', TRUE);
Advanced usage
It is possible to create a message with chaining calls.
$mailer = Email::factory(); $mailer ->to('to-recipient@example.com', 'To recipient') ->from('the-sender@example.com', 'The sender') ->subject('Test-email') ->html('<i>Test email body</i>') ->send();