Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/svenbw/kohana-email
Email module for Kohana
https://github.com/svenbw/kohana-email
email koseven phpmailer swiftmailer
Last synced: 3 months ago
JSON representation
Email module for Kohana
- Host: GitHub
- URL: https://github.com/svenbw/kohana-email
- Owner: svenbw
- Created: 2017-02-14T22:11:54.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-08-25T07:27:06.000Z (over 6 years ago)
- Last Synced: 2024-09-19T00:28:23.732Z (4 months ago)
- Topics: email, koseven, phpmailer, swiftmailer
- Language: PHP
- Size: 18.6 KB
- Stars: 3
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Kohana Email module
===================Kohana 3.3 and Koseven compatible email module using SwiftMailer or PHPMailer.
## How to install
### Direct download method
1. Download to modules directory.
2. Fetch dependencies:
```
composer install
```
3. Include it in `APPPATH/bootstrap.php` modules list:
```php
Kohana::modules(array(
...
'email' => MODPATH.'email',
...
));
```### Composer module method
1. Include with composer:
```
composer require svenbw/kohana-email:dev-master
```
2. Enable vendor autoload in `APPPATH/bootstrap.php` if not already:
```php
require DOCROOT.'/vendor/autoload.php';
```
3. In the same file include it in your modules list:
```php
Kohana::modules(array(
...
'email' => DOCROOT.'/vendor/svenbw/kohana-email',
...
));
```## Usage
Send a message to a recipient
```php
$mailer = Email::connect();
$mailer->send(
array('[email protected]', 'To recipient'),
array('[email protected]', 'The sender'),
'Test-email',
'Test email',
TRUE);
```## Advanced usage
It is possible to create a message with chaining calls.
```php
$mailer = Email::factory();
$mailer
->to('[email protected]', 'To recipient')
->from('[email protected]', 'The sender')
->subject('Test-email')
->html('Test email body')
->send();
```