analyticsface / yii2-mailgun
Mailgun SDK PHP for Yii2 Framework.
Installs: 3 267
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 1
Open Issues: 0
Type:yii2-extension
Requires
- guzzlehttp/psr7: ^1.6
- mailgun/mailgun-php: ^2.8
- php-http/curl-client: ^1.7
- yiisoft/yii2: ~2.0
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)