mediastuttgart/cleverreach

AddOn for SallyCMS, integrating the CleverReach API

This package's canonical repository appears to be gone and the package has been frozen as a result.

v2.0.0 2013-09-18 19:38 UTC

This package is not auto-updated.

Last update: 2020-08-17 08:12:47 UTC


README

CleverReach offers you powerful email marketing software which enables you to create your professional emails online, send them safely, measure the success and manage your email contacts.

Introduction

The cleverreach addOn provides a simple interface to communicate with CleverReach API. To use this addOn you need an account at CleverReach. You can register for free at http://www.cleverreach.de/

Installation

  • Add cleverreach to your composer.json
  • Run php composer.phar update to install

Example composer.json

"require": {
	"php": ">=5.2.1",
	"sallycms/composer-installer": "~1.1",
	"sallycms/core": "0.8.*",
	"sallycms/backend": "0.8.*",
	"sallycms/frontend": "0.8.*",
	"sallycms/setup": "0.8.*",
	"mediastuttgart/cleverreach": "1.0.*"
}

After successfully installing the addOn you need to provide a CleverReach API-Key and WSDL-URL. These data can be found in your CleverReach user account.

  • Login to your SallyCMS Backend
  • Click on Global Settings and then CleverReach
  • Enter your API-Key and the WSDL-URL

Documentation

The cleverreach addOn supports almost all required methods to manage subscribers from within SallyCMS.

  • List available groups
  • List available forms
  • List active members of a group
  • Add a member to a group
  • Update a member
  • Remove a member
  • Activate a member
  • Deactivate a member
  • Send activation email

Get available groups

#!php
<?php

$api = new Cleverreach();
$api->getGroups();

Get available forms

#!php
<?php

$api = new Cleverreach();
$api->getForms();

Get active members

#!php
<?php

$api = new Cleverreach();
$api->getGroupMembers($groupId, $status = 'active');

Adding a member

#!php
<?php

$attributes = array(
	'title'     => 'Mrs',
	'firstname' => 'John',
	'name'      => 'Doe'
);

$api = new Cleverreach();
$api->addMember($groupId, $email, $attributes);

Updating a member

#!php
<?php

$attributes = array(
	'title'     => 'Mr',
	'firstname' => 'John',
	'name'      => 'Smith'
);

$api = new Cleverreach();
$api->updateMember($groupId, $email, $attributes);

Removing a member

#!php
<?php

$api = new Cleverreach();
$api->removeMember($groupId, $email);

Activating a member

#!php
<?php

$api = new Cleverreach();
$api->activateMember($groupId, $email);

Deactivating a member

#!php
<?php

$api = new Cleverreach();
$api->deactivateMember($groupId, $email);

Sending an activation mail

#!php
<?php

$data = array(
	'user_ip'    => sly_Core::getRequest()->getClientIp(),
	'user_agent' => sly_Core::getRequest()->getUserAgent(),
	'referer'    => sly_Core::getRequest()->getAppBaseUrl()
);

$api = new Cleverreach();
$api->sendActivationMail($formId, $email, $data);

Sending an unsubscribe mail

#!php
<?php

$api = new Cleverreach();
$api->sendUnsubscribeMail($formId, $email);

Get member by email

#!php
<?php

$api = new Cleverreach();
$api->getMemberByEmail($groupId, $email);