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.

Installs: 8 962

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 1

Type:yii2-extension

v1.1 2015-09-09 09:28 UTC

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();
?>```