Skip to content

Commit 638798a

Browse files
committed
Updated SparkPost References and updated docs and mappings to reflect
updated config lists.
1 parent fea870e commit 638798a

14 files changed

+65
-42
lines changed

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,30 @@ try {
4747
* [Transmissions](https://github.com/MessageSystems/php-sdk/tree/master/examples/transmission/)
4848
* Read our REST API documentation - <http://www.sparkpost.com/docs/introduction>
4949

50+
## Field Descriptions
51+
### Transmissions
52+
| Field Name | Required? | Description | Data Type |
53+
| ------------ | ----------- | ------------- | ----------- |
54+
| description | no | Field for describing what this transmission is for the user | String |
55+
| campaign | no | Field for assigning a given transmission to a specific campaign, which is a logical container for similar transmissions | String |
56+
| metadata | no | Field for adding arbitrary key/value pairs which will be included in open/click tracking | Object (Simple) |
57+
| substitutionData | no | Field for adding transmission level substitution data, which can be used in a variety of fields and in content | Object (Complex) |
58+
| trackOpens | no | Field for enabling/disabling transmission level open tracking (default: true) | Boolean |
59+
| trackClicks | no | Field for enabling/disabling transmission level click tracking (default: true) | Boolean |
60+
| useDraftTemplate | no | Field for allowing the sending of a transmission using a draft of a stored template (default: false) | Boolean |
61+
| replyTo | no | Field for specifying the email address that should be used when a recipient hits the reply button | String |
62+
| subject | yes | Field for setting the subject line of a given transmission | String |
63+
| from | yes | Field for setting the from line of a given transmission | String or Object |
64+
| html | yes** | Field for setting the HTML content of a given transmission | String |
65+
| text | yes** | Field for setting the Plain Text content of a given transmission | String |
66+
| rfc822 | no** | Field for setting the RFC-822 encoded content of a given transmission | String |
67+
| template | no** | Field for specifying the Template ID of a stored template to be used when sending a given transmission | String |
68+
| customHeaders | no | Field for specifying additional headers to be applied to a given transmission (other than Subject, From, To, and Reply-To) | Object (Simple) |
69+
| recipients | yes** | Field for specifying who a given transmission should be sent to | Array of Objects |
70+
| recipientList | no** | Field for specifying a stored recipient list ID to be used for a given transmission | String |
71+
72+
** - If using inline content then html or text are required. If using RFC-822 Inline Content, then rfc822 is required. If using a stored recipient list, then recipientList is required. If using a stored template, then template is required.
73+
5074
## Tips and Tricks
5175
### General
5276
* You _must_ provide at least an API key when instantiating the SparkPost Library - `[ 'key'=>'184ac5480cfdd2bb2859e4476d2e5b1d2bad079bf' ]`

composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
2-
"name": "messagesystems/php-sdk",
2+
"name": "sparkpost/php-sdk",
33
"description": "SDK for interfacing with messagesystems APIs",
4-
"license": "Apache",
4+
"license": "Apache 2.0",
55
"authors": [
66
{
7-
"name": "Message Systems",
7+
"name": "Message Systems, Inc.",
88
"email": "[email protected]"
99
}
1010
],
@@ -19,7 +19,7 @@
1919
},
2020
"autoload": {
2121
"psr-4": {
22-
"MessageSystems\\": "lib/MessageSystems/"
22+
"SparkPost\\": "lib/SparkPost/"
2323
}
2424
}
2525
}

composer.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/transmission/configuration_based.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,14 @@
22
namespace Examples\Transmisson;
33
require_once (dirname(__FILE__).'/../bootstrap.php');
44

5-
use MessageSystems\SparkPost;
6-
use MessageSystems\Transmission;
5+
use SparkPost\SparkPost;
6+
use SparkPost\Transmission;
77

88
$key = 'YOURAPIKEY';
99
SparkPost::setConfig(['key'=>$key]);
1010

1111
try {
1212
$results = Transmission::send([
13-
"returnPath"=>"[email protected]",
1413
"from"=>"From Envelope <[email protected]>",
1514
"html"=>"<p>Hello World!</p>",
1615
"text"=>"Hello World!",

examples/transmission/get_all_transmissions.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
namespace Examples\Transmisson;
33
require_once (dirname(__FILE__).'/../bootstrap.php');
44

5-
use MessageSystems\SparkPost;
6-
use MessageSystems\Transmission;
5+
use SparkPost\SparkPost;
6+
use SparkPost\Transmission;
77

88
$key = 'YOURAPIKEY';
99
SparkPost::setConfig(['key'=>$key]);

examples/transmission/get_transmission.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?php
22
namespace Examples\Transmisson;
33
require_once (dirname(__FILE__).'/../bootstrap.php');
4-
use MessageSystems\SparkPost;
5-
use MessageSystems\Transmission;
4+
use SparkPost\SparkPost;
5+
use SparkPost\Transmission;
66

77
$key = 'YOURAPIKEY';
88
SparkPost::setConfig(['key'=>$key]);

examples/transmission/rfc822.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?php
22
namespace Examples\Transmisson;
33
require_once (dirname(__FILE__).'/../bootstrap.php');
4-
use MessageSystems\SparkPost;
5-
use MessageSystems\Transmission;
4+
use SparkPost\SparkPost;
5+
use SparkPost\Transmission;
66

77
$key = 'YOURAPIKEY';
88
SparkPost::setConfig(['key'=>$key]);

examples/transmission/send_transmission_all_fields.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?php
22
namespace Examples\Transmisson;
33
require_once (dirname(__FILE__).'/../bootstrap.php');
4-
use MessageSystems\SparkPost;
5-
use MessageSystems\Transmission;
4+
use SparkPost\SparkPost;
5+
use SparkPost\Transmission;
66

77
$key = 'YOURAPIKEY';
88
SparkPost::setConfig(['key'=>$key]);
@@ -19,11 +19,11 @@
1919
],
2020
"description"=>"my description",
2121
"replyTo"=>"[email protected]",
22-
"headers"=>[
22+
"CustomHeaders"=>[
2323
"X-Custom-Header"=>"Sample Custom Header"
2424
],
25-
"openTracking"=>false,
26-
"clickTracking"=>false,
25+
"trackOpens"=>false,
26+
"trackClicks"=>false,
2727
"from"=>"From Envelope <[email protected]>",
2828
"html"=>"<p>Hello World! Your name is: {{name}}</p>",
2929
"text"=>"Hello World!",

examples/transmission/stored_recipients_inline_content.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?php
22
namespace Examples\Transmisson;
33
require_once (dirname(__FILE__).'/../bootstrap.php');
4-
use MessageSystems\SparkPost;
5-
use MessageSystems\Transmission;
4+
use SparkPost\SparkPost;
5+
use SparkPost\Transmission;
66

77
$key = 'YOURAPIKEY';
88
SparkPost::setConfig(['key'=>$key]);

examples/transmission/stored_template_send.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?php
22
namespace Examples\Transmisson;
33
require_once (dirname(__FILE__).'/../bootstrap.php');
4-
use MessageSystems\SparkPost;
5-
use MessageSystems\Transmission;
4+
use SparkPost\SparkPost;
5+
use SparkPost\Transmission;
66

77
$key = 'YOURAPIKEY';
88
SparkPost::setConfig(['key'=>$key]);

0 commit comments

Comments
 (0)