analyticsface/yii2-mailgun

Mailgun SDK PHP for Yii2 Framework.

Installs: 2 128

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 2

Open Issues: 0

Type:yii2-extension

v1.2.1 2020-01-15 05:36 UTC

This package is auto-updated.

Last update: 2020-03-15 06:04:45 UTC


README

Installation

The preferred way to install this extension is through composer. This requires the composer-asset-plugin, which is also a dependency for yii2 – so if you have yii2 installed, you are most likely already set.

Add to composer.json

"analyticsface/yii2-mailgun" : "~1.2"

to the require section of your application's composer.json file.

Usage

'components' => [
     ...
    'mailer' => [
        'class' => 'aface\mailgun\Mailer',
        'viewPath' => '@common/mail',
        'key' => 'key-example',
        'domain' => 'mg.example.com',
    ],
    ...
],

Validate email

Yii::$app->mailer->emailValidate($email)