cinghie / yii2-elasticemail
Yii2 Elasticemail to manage Elasticemail Email Platform in a Yii2 site.
Installs: 265
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 0
Open Issues: 0
Type:yii2-extension
Requires
- elastic-email/web-api-client: @dev
- yiisoft/yii2: ~2.0.14
This package is auto-updated.
Last update: 2024-09-08 11:51:30 UTC
README
Yii2 Elasticemail extension to manage the Elastice Email Marketing Platform:
- Website: https://www.elasticemail.com
- Documentation: https://api.elasticemail.com/public/help#start
- PHP SDK: https://github.com/ElasticEmail/ElasticEmail.WebApiClient-php
- Example: https://github.com/ElasticEmail/ElasticEmail.WebApiClient-php/blob/master/examples/example.php
Installation
The preferred way to install this extension is through composer.
Either run
$ php composer.phar require cinghie/yii2-elasticemail "*"
or add
"cinghie/yii2-elasticemail": "*"
Configuration
Set on your configuration file
use cinghie\elasticemail\components\Elasticemail as ElasticemailComponent;
'components' => [
'elasticemail' => [
'class' => ElasticemailComponent::class,
'apiUrl' => 'https://api.elasticemail.com/v2/',
'apiKey' => 'YOUR_ELASTICEMAIL_API_KEY'
],
]
Usage
\Yii::$app->elasticemail;
\Yii::$app->elasticemail->getClient();
\Yii::$app->elasticemail->getAccessTokens();
\Yii::$app->elasticemail->getAccount();
\Yii::$app->elasticemail->getCampaigns();
\Yii::$app->elasticemail->getChannels();
\Yii::$app->elasticemail->getContacts();
\Yii::$app->elasticemail->getDomains();
\Yii::$app->elasticemail->getEelists();
\Yii::$app->elasticemail->getTemplates();