Yii2 Mailgun Mailer
![Software License][ico-license]
![Coverage Status][ico-scrutinizer]
![Total Downloads][ico-downloads], (*1)
Mailgun mailer for Yii 2 framework., (*2)
Install
Via Composer, (*3)
``` bash
$ composer require ninjacto/yii2-mailgun, (*4)
## Config
```php
'components' => [
...
'mailer' => [
'class' => 'ninjacto\yii2mailgun\Mailer',
'domain' => 'example.com',
'key' => 'key-somekey',
'tags' => ['yii'],
'enableTracking' => false,
],
...
],
?>
Usage
Once the extension is installed, simply use it in your code by :, (*5)
<?php
Yii::$app->mailer->compose('<view_name>', <option>)
->setFrom("<from email>")
->setTo("<to email>")
->setSubject("<subject>")
// ->setHtmlBody("<b> Hello User </b>")
// ->setTextBody("Hello User")
->send();
?>
Change log
Please see CHANGELOG for more information what has changed recently., (*6)
Testing
bash
$ composer test
, (*7)
Contributing
Please see CONTRIBUTING and CONDUCT for details., (*8)
Security
If you discover any security related issues, please email ramin.farmani@gmail.com instead of using the issue tracker., (*9)
Credits
License
The MIT License (MIT). Please see License File for more information., (*10)