PHPackages                             joesexton00/exacttarget - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Mail &amp; Notifications](/categories/mail)
4. /
5. joesexton00/exacttarget

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

joesexton00/exacttarget
=======================

Component library for ExactTarget API

1.1.0(12y ago)57.0k1[1 PRs](https://github.com/joesexton00/exacttarget/pulls)MITPHPPHP &gt;=5.3.5

Since Nov 6Pushed 10y ago1 watchersCompare

[ Source](https://github.com/joesexton00/exacttarget)[ Packagist](https://packagist.org/packages/joesexton00/exacttarget)[ Docs](https://github.com/joesexton00/exacttarget)[ RSS](/packages/joesexton00-exacttarget/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (1)Dependencies (1)Versions (6)Used By (0)

ExactTargetComponent
====================

[](#exacttargetcomponent)

**Package:** joesexton00\\exactTarget
**Uses:** EtBaseClass.php
**Version:** 1.1

This is a fork of [Micah Breedlove's Exact Target bundle](https://github.com/druid628/exacttarget) and builds on his work to add Data Extension functionality and a few other features. Much credit is due to him for this bundle!

General
-------

[](#general)

The ExactTarget component is a collection of classes based on the ExactTarget PHP starter kit. The purpose of this library is to spend less time writing Exact Target code and more time working with your application. The EtClient handles all SOAP communication. This class holds several functions (defined below) which allows the EtClient to be self-sufficent on a basic level. ExactTarget API PHP starter kit (available: [http://docs.code.exacttarget.com/@api/deki/files/199/=PHP\_APIstarterKit-V1.zip](http://docs.code.exacttarget.com/@api/deki/files/199/=PHP_APIstarterKit-V1.zip)Source: [http://docs.code.exacttarget.com/020\_Web\_Service\_Guide/API\_Starter\_Kits](http://docs.code.exacttarget.com/020_Web_Service_Guide/API_Starter_Kits))

Usage
-----

[](#usage)

The EtClient is the main conduit to the ExactTarget API. All interactions should go through it. Other classes can be used outside the context of the EtClient file.

Each *magic* function works as Symfony-like *magic* getters and setters. The create, recall, update, and bundle each execute SOAP calls to preform their intended action.

**Example (subscriber)**:

```
// instantiates the Client for SOAP Communications
$client = new EtClient($userName,$password);

// Subscriber object is passed the client
$subscriber = new EtSubscriber($client);

$subscriberKey = $emailAddress = "user@domain.com";
// Find a subscriber from ExactTarget by subscriber key (email address is
// optional)
$subscriber->find($subscriberKey, $emailAddress);

// Add Subscriber to a specific list (by list id)
$subscriber->addToList("24601");

// Build a new Attribute
$newAttrib = new EtAttribute();
$newAttrib->setName('Metroid Save Code'); // Attribute Name
$newAttrib->setValue("------ ---mE3 l-y000 00y00j"); // Attribute Value

// setAttributes is be used for initially setting attributes on subscriber
$subscriber->setAttributes(array($newAttrib));
// updateAttribute is used for objects which already have attributes
// $subscriber->updateAttribute($newAttrib);

// Update Subscriber record
$subscriber->save();
/* either by the save method on EtSubscriber or
 * via the EtClient
 * $client->updateSubscriber($subscriber, 'updateOnly');
 */

```

**Example (Triggered Send)**:

```
// Initialize EtClient
$client = new EtClient($userName,$password);

// create Triggered Send object giving it access to the EtClient object
$ts = new EtTriggeredSend($client);

// Define which triggered send to use
$ts->useKey("defeatedMotherBrain");

// create Subscriber object giving it access to the EtClient object
$sub = new EtSubscriber($client);

// search for a user by subscriber key [required] and
// email address [optional]
$sub->find("user@domain.com","user@domain.com");

// define the subscribers the Triggered Send is bound for
$ts->setSubscribers(array($sub));

// execute send
$ts->send();

```

**Example (Data Extension)**:

```
// initialize
$this->dataExtension->init();

// retrieve the DE, specify which fields to get
$this->dataExtension->find( array( 'field1', 'field2', 'field3' ) );

// update a DE property using key/value pair
$this->dataExtension->updateProperty( 'key', 'value' );

// persist
$this->dataExtension->save();

```

---

EtClient
--------

[](#etclient)

The bread and butter of this library. The ExactTarget starterKit provides a series of samples leans to a very buck-shot scattered method for use of SOAP calls. This puts all interactions with the SOAP calls in one place.

\####Functions

There are three (3) function calls built into this client:

- buildTriggeredSend
- sendEmail
- getDefinitionOfObject

The **buildTriggeredSend** function accepts two (2) arguments the first -- required -- is the triggeredSendKey which is the "External Key" for the specific Triggered Email and can be found in the Web UI under Interactions &gt; Messages &gt; TriggeredSends.

The second -- optional -- is an array of options built as a key-value pair which should correspond with available variables on the EtTriggeredSendDefinition class.

`$EtClient->buildTriggeredSend($triggeredSendKey, [$optionalAttributesArray]);`

The **sendEmail** function accepts two (2) *required* variables the first is an Et object which is valid for sending (e.g. EtTriggeredSend, EtEmail, etc) the second is the SendType the type of the object which should be used for SOAP communications.

`$EtClient->sendEmail($EmailableClass, $EmailableClassType);`

The **getDefinitionOfObject** function is a function provided by the Exact Target PHP Starter Kit used for getting the properties of an Exact Target record (think of mysql&gt; DESC

;) and returning the properties that are "Retrievable".`$EtClient->getDefinitionOfObject($EtClass);`

- #### Magic

    [](#magic)

There are four (4) *magic* function calls built into this client (for an example of their useage see the Usage heading below).

- create - creates and returns a specified Et object
- recall - retrieve an Et class for an existing Exact Target record based on filter parameters provided (returns false if none exists)
- update - updates an existing Exact Target record based on the Et object given
- bundle - Batch update method which will call an Update request used to add many subscribers, etc.

---

CHANGELOG
---------

[](#changelog)

\###1.0 ####Client Access EtEmail, EtList, EtSubscriber, and EtTriggeredSend all now can be passed the EtClient allowing for save and send functions (see below). ####Save Methods EtEmail, EtList and EtSubscriber objects now have a save() method which eliminates the need for calling the client update yourself. ####Send Methods EtEmail and EtTriggeredSend objects now have a send() method which eliminates the need for calling the client sendEmail yourself. ###1.0.2 ####composer Added lib-openssl and ext-mcrypt to composer.json file ###1.1.0 #####New Features Added data extension wrapper and a few other features.

---

Contributors
------------

[](#contributors)

- Micah Breedlove -  - [@druid628](http://twitter.com/druid628)
- Matt Rathbun
- Joe Sexton -  - [@joesexton00](http://twitter.com/joesexton00)

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 62.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~139 days

Total

4

Last Release

4518d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/78339ef708f025bb5a3a3e1cde1318eb6a0dcde68414a9d0b55ab34f7c02685d?d=identicon)[joesexton00](/maintainers/joesexton00)

---

Top Contributors

[![joesexton00](https://avatars.githubusercontent.com/u/1900749?v=4)](https://github.com/joesexton00 "joesexton00 (22 commits)")[![druid628](https://avatars.githubusercontent.com/u/522820?v=4)](https://github.com/druid628 "druid628 (13 commits)")

---

Tags

apiemailexact targetexacttarget

### Embed Badge

![Health badge](/badges/joesexton00-exacttarget/health.svg)

```
[![Health](https://phpackages.com/badges/joesexton00-exacttarget/health.svg)](https://phpackages.com/packages/joesexton00-exacttarget)
```

###  Alternatives

[druid628/exacttarget

Component library for ExactTarget API

14104.2k1](/packages/druid628-exacttarget)[ecomailcz/ecomail

Ecomail.cz API Wrapper

17383.8k4](/packages/ecomailcz-ecomail)[hafael/azure-mailer-driver

Supercharge your Laravel or Symfony app with Microsoft Azure Communication Services (ACS)! Effortlessly add email, chat, voice, video, and telephony-over-IP for next-level communication. 🚀

14109.2k](/packages/hafael-azure-mailer-driver)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
