be-lenka / smartemailing
Easy way to interact with SmartEmailing API from PHP
1.0.2
2022-01-31 14:08 UTC
Requires
- guzzlehttp/guzzle: ^6.3
- nette/utils: ^2.2
This package is auto-updated.
Last update: 2024-11-10 15:13:31 UTC
README
Easy way to interact with SmartEmailing API from Nette PHP Framework
Installation
The best way to install this component is using Composer:
composer require be-lenka/smartemailing
Then it is required to add the following lines to config.neon
:
parameters: smartemailing: username: <smartemailing_username> token: <smartemailing_api_token> services: - belenka\SmartEmailing(%smartemailing.username%, %smartemailing.token%)
Usage
Insert a new contact into SmartEmailing lists:
$this->smartEmailing->importContact($email, $name, $surname, $language, $contactLists, $properties, $customFields, $purposes, $settings);
Insert a order data into SmartEmailing lists:
$this->smartEmailing->importOrders($data);
Get an exisitng contact by email:
$this->smartEmailing->getContactsByEmail($email);
Get all contacts:
$this->smartEmailing->getContacts();
Get an exisitng contact by user's ID:
$this->smartEmailing->getContact($id);