albertborsos / yii2-mailmaster
Yii2 wrapper class for MailMaster API
Installs: 3
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 0
Open Issues: 0
Type:yii2-extension
Requires
- php: >=5.4.0
- guzzlehttp/guzzle: 6.1.*
- yiisoft/yii2: >=2.0.6
This package is auto-updated.
Last update: 2024-11-08 07:53:04 UTC
README
MailMaster API wrapper for Yii2 projects
How to config in your project
'components' => [ ... 'mailmaster' => [ 'class' => 'albertborsos\mailmaster\MailMaster', 'apiUser' => 'mailmaster-api-user-name', 'apiKey' => 'mailmaster-api-password', 'forms' => [ 'your-form-id' =>[ 'formID' => 'mailmaster-form-id', 'listID' => 'mailmaster-list-id', ], ], ], ... ], ...
How to handle after form submit
/** @var \albertborsos\mailmaster\MailMaster $mmc */ $mmc = Yii::$app->mailmaster; $mm = $mmc->factory($this->_listID, $this->_formID); $response = $mm->subscribe([ 'email' => $this->email, 'mssys_firstname' => $this->nameFirst, 'mssys_lastname' => $this->nameLast, ]);