keltuo / php-smartemailing
Smart Emailing API v3 client for PHP
Installs: 6 412
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 1
Forks: 1
Open Issues: 1
Requires
- php: >=8.0
- ext-json: *
- guzzlehttp/guzzle: >=6.2
- symfony/string: >=5.1
Requires (Dev)
- jetbrains/phpstorm-attributes: ^1.0
- phpstan/phpstan: ^1.2.0
- phpunit/phpunit: ^9.5
- slevomat/coding-standard: ^7.0
- squizlabs/php_codesniffer: *
README
Smart Emailing PHP Client Library v3
The UnOfficial (maybe one day) PHP library for using the SmartEmailing v3 API.
Explore the docs »
Examples
·
Report Bug
·
Request Feature
Table of Contents
Getting Started
Before using this library, you must have a valid API Key. To get an API Key, please log in to your SmartEmailing account.
Installation
This library requires PHP 8 and higher.
The recommended way to install the SmartEmailing PHP Library is through composer.
# Install Composer
curl -sS https://getcomposer.org/installer | php
composer require keltuo/php-smartemailing
After installing, you need to require Composer's autoloader:
require 'vendor/autoload.php'; use SmartEmailing\SmartEmailing;
Usage
use SmartEmailing\SmartEmailing; // Create an Api instance with your username and apiKey. $sm = new SmartEmailing('username', 'api-key'); // Call shortcut method for request Contacts $sm->contacts() ->getList()->getData();
For more examples, please refer to the Documentation
Tests
In project is Docker Compose file, which support PHP8-cli and composer image.
Basic usage
Download composer dependecy and run Unit Tests
docker-compose up
How to set up PHP storm for Run test via docker
[link]
Api coverage tree
SmartEmailing Doc API V3
https://app.smartemailing.cz/docs/api/v3/index.html
- Tests Code Examples | doc api
- Aliveness test
- GET Login test
- POST Login test
- Contactlists Code Examples | doc api
- Count of added contacts in list
- Create new Contactlist
- Distribution of Contactlist
- Get Contactlists
- Get single Contactlist
- Truncate Contactlist
- Update Contactlist
- Customfields Code Examples | doc api
- Create new Customfield
- Delete Customfield
- Get Customfield values
- Get Customfields
- Get single Customfield
- Automation Code Examples | doc api
- Trigger event
- Contacts Code Examples | doc api
- Change e-mail address of single contact
- Forget contact
- Get Contacts
- Get single Contact
- Contacts in lists Code Examples | doc api
- Get all Contacts in list
- Get confirmed Contacts in list
- Get unsubscribed Contacts in list
- Custom campaigns Code Examples | doc api
- Send bulk custom SMS
- Send bulk custom emails
- Send transactional emails
- Customfield Options Code Examples | doc api
- Create new Customfield option
- Delete Customfield option
- Get Customfield options
- Get single Customfield option
- Update Customfield option
- E shops Code Examples | doc api
- Add Placed order
- Import orders in bulk
- Emails Code Examples | doc api
- Create e-mail from template
- Create new E-mail
- Get E-mails
- Get confirmation emails
- Get single E-mail
- Generic collections TODO
- Bulk upsert items
- Delete item
- Exchange collections TODO
- Get items
- Get single item
- Generic events TODO
- Bulk upsert events
- Delete event
- Get events
- Get single event
- Import Code Examples | doc api
- Import contacts
- Newsletter Code Examples | doc api
- Create newsletter
- Processing purposes Code Examples | doc api
- Create new Processing purpose
- Get Processing purpose connections
- Get Processing purposes
- Revoke Processing purpose connection
- Scoring Code Examples | doc api
- Scoring result history for all contacts
- Stats Code Examples | doc api
- Get campaign sent stats
- Get newsletter stats summaries
- Transactional emails Code Examples | doc api
- Get transactional email ids
- Web Forms Code Examples | doc api
- Get all Web Form ids and names
- Get single Web Form structure
- Webhooks Code Examples | doc api
- Create new Webhook
- Delete Webhook
- Get Webhooks
ToDo
See the open issues for a full list of proposed features (and known issues).
Contributing
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
License
Distributed under the MIT License. See LICENSE
for more information.
Contact
Lukas Paiskr - @keltuo - lukas@pasysdev.cz
Project Link: https://github.com/keltuo/php-smartemailing