popsugar / php-yesmail-api
PHP implementation of the Yesmail v1 API
Installs: 1 473
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 76
Forks: 1
Open Issues: 0
Requires
- php: >=5.4.0
- guzzle/guzzle: ~3.7
- dev-master
- 1.0.0
- dev-cp-curl-close
- dev-nyeo-get-masterid-from-name
- dev-mp-yesmail-cant-count
- dev-cp-dont-check-logical-connector
- dev-cp-subscriber-retrieve
- dev-cp-target-attribute-bug-fixes
- dev-cp-status-bug
- dev-cp-fix-exception-namespace
- dev-cp-2621
- dev-cp-subscribe-and-send
- dev-integration-bug-fixes
- dev-cp-fix-for-tests
- dev-subscriber-update
- dev-remove-shopstyle
- dev-master-get-by-name
- dev-remove-guzzle
- dev-cp-asset-api
- dev-pk-readme
This package is not auto-updated.
Last update: 2025-02-01 15:54:42 UTC
README
Yesmail v1 API PHP Client. Implementation for Subscriber, Master, and List Management APIs.
Getting started
Yesmail can be installed using composer. Add the following to your composer.json file.
"popsugar/php-yesmail-api": "1.0.0"
Examples
Subscriber API Sample code:
$client = new Yesmail\CurlClient('username', 'password'); $yesmail = new Yesmail\Yesmail($client); $subscriber = $yesmail->Subscriber_Lookup(array('email' => 'user@company.com'));
Master API Sample code:
$client = new Yesmail\CurlClient('username', 'password'); $yesmail = new Yesmail\Yesmail($client); $masterName = 'Test Master'; $fromName = 'yoursite'; $fromDomain = 'yoursite.com'; $division = 'My Division'; $encoding = 'UTF-8'; $subject = 'A Subject'; $envelope = new Yesmail\YesmailMasterEnvelope($masterName, $fromName, $fromDomain, $division, $encoding, $subject); $targeting = NULL; $scheduling = array(); $ret = $yesmail->Master_Create($envelope, $targeting, $scheduling);
List Management API Sample code:
$client = new Yesmail\CurlClient('username', 'password'); $yesmail = new Yesmail\Yesmail($client); $name = 'My List'; $type = 'DISTRIBUTIONLIST'; $subtype = 'SEEDLIST'; $deleteInsteadOfAppend = true; $subscriberIds = array(1, 2, 3); $emails = array(); $subscriberList = new Yesmail\YesmailListManagementSubscriberList($deleteInsteadOfAppend, $subscriberIds, $emails); $modifyList = new Yesmail\YesmailListManagementModifyList($name, $type, $subtype, $subscriberList); $ret = $yesmail->ListManagement_Update_List($modifyList);
Contributing
To contribute to this project:
- Create a fork of this repository
- Create a thoughtfully named branch for your feature/bug
- Package your changes into meaningful commits with meaningful commit messages.
- Open a pull-request into PopSugar/php-yesmail-api@master
Please write unit tests for new code, and make sure existing unit tests pass. You can run the unit tests using phpunit
from the top level directory.