analyticsface/yii2-mailgun

Mailgun SDK PHP for Yii2 Framework.

Installs: 3 172

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 1

Open Issues: 0

Type:yii2-extension

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

This package is auto-updated.

Last update: 2024-03-28 14:51:44 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)