ninjacto / yii2-mailgun
Mailgun mailer component for Yii 2 framework.
Installs: 11 689
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 2
Forks: 0
Open Issues: 0
Language:HTML
Type:yii2-extension
Requires
- php: ~5.4|~7.0
- guzzlehttp/psr7: ~1.3
- mailgun/mailgun-php: ~2.1
- php-http/curl-client: ~1.6
- yiisoft/yii2: ~2
Requires (Dev)
- phpunit/phpunit: ~4.0||~5.0
- squizlabs/php_codesniffer: ^2.3
This package is not auto-updated.
Last update: 2025-02-01 21:30:59 UTC
README
Mailgun mailer for Yii 2 framework.
Install
Via Composer
$ composer require ninjacto/yii2-mailgun
Config
'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 :
<?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.