farmani / yii2mailgunmailer
This package is abandoned and no longer maintained.
The author suggests using the ninjacto/yii2-mailgun package instead.
Mailgun Mailer for Yii 2 framework.
Package info
github.com/farmani/yii2mailgunmailer
Type:yii2-extension
pkg:composer/farmani/yii2mailgunmailer
v1.1
2015-09-09 09:28 UTC
Requires
- mailgun/mailgun-php: 1.8
- yiisoft/yii2: *
This package is not auto-updated.
Last update: 2022-02-01 12:51:07 UTC
README
Mailgun mailer for Yii 2 framework.
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist farmani/yii2mailgunmailer "*"
or add
"farmani/yii2mailgunmailer": "*"
to the require section of your composer.json file.
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 <?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(); ?>```