infoweb-internet-solutions / yii2-flexmail
A wrapper for the Flexmail API
Installs: 65
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 0
Open Issues: 2
Type:yii2-extension
Requires
- yiisoft/yii2: @stable
This package is not auto-updated.
Last update: 2024-12-21 18:59:17 UTC
README
Installation
The preferred way to install this extension is through http://getcomposer.org/download/.
Either run
php composer.phar require infoweb-internet-solutions/yii2-flexmail "dev-master"
or add
"infoweb-internet-solutions/yii2-flexmail": "dev-master"
to the require section of your composer.json
file.
Usage
Register the module in common/config/main.php
'modules' => [ ... 'flexmail' => [ 'class' => 'infoweb\flexmail\Module', 'userId' => 'xxxxxx', 'userToken' => 'xxxxx-xxxxx-xxxxx-xxxxx-xxxxxxxxxx' ], ...
This will automatically register the infoweb\flexmail\components\Flexmail
component that can be used to communicate with your Flexmail account. Below is an example of how to create a contact in Flexmail by using the Contact service:
Yii::$app->flexmail->service('Contact')->create([ 'mailingListId' => xxxxxx, 'emailAddressType' => [ 'emailAddress' => 'example@email.com', 'name' => 'John', 'surname' => 'Doe', 'company' => 'Infoweb' ] ]);