ninjacto/yii2-mailgun

Mailgun mailer component for Yii 2 framework.


Keywords
mailer, extension, mailgun, yii2, ninjacto, yii2-mailgun
License
MIT

Documentation

Yii2 Mailgun Mailer

Latest Version on Packagist Software License Build Status Coverage Status Quality Score Total Downloads

Mailgun mailer for Yii 2 framework.

Install

Via Composer

$ composer require ninjacto/yii2-mailgun

Config

'components' => [
        ...
        'mailer' => [
                'class' => 'farmani\yii2mailgunmailer\Mailer',
                'domain' => 'example.com',
                'key' => 'key-somekey',
                'tags' => ['yii'],
                'enableTracking' => false,
        ],
        ...
],
?>

Usage

Once the extension is installed, simply use it in your code by :

<?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.

Testing

$ composer test

Contributing

Please see CONTRIBUTING and CONDUCT for details.

Security

If you discover any security related issues, please email ramin.farmani@gmail.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.