summaryrefslogtreecommitdiffstats
path: root/examples/transmission/send_transmission_all_fields.php
diff options
context:
space:
mode:
authorbeardyman <nornholdj@gmail.com>2015-10-03 11:05:25 -0400
committerbeardyman <nornholdj@gmail.com>2015-10-03 11:05:25 -0400
commitada533a743125008474de854a3f6bcec5c104fbe (patch)
treec640e50d2a4d9cacae7c7964260f18c3af5258a8 /examples/transmission/send_transmission_all_fields.php
parent55d428cb95c10c7b94225760a663f28d50190091 (diff)
downloadphp-sparkpost-ada533a743125008474de854a3f6bcec5c104fbe.zip
php-sparkpost-ada533a743125008474de854a3f6bcec5c104fbe.tar.gz
php-sparkpost-ada533a743125008474de854a3f6bcec5c104fbe.tar.bz2
replaced tabs with two spaces. normalized quotes
Diffstat (limited to 'examples/transmission/send_transmission_all_fields.php')
-rw-r--r--examples/transmission/send_transmission_all_fields.php58
1 files changed, 29 insertions, 29 deletions
diff --git a/examples/transmission/send_transmission_all_fields.php b/examples/transmission/send_transmission_all_fields.php
index bbd6f6b..749f0cb 100644
--- a/examples/transmission/send_transmission_all_fields.php
+++ b/examples/transmission/send_transmission_all_fields.php
@@ -3,7 +3,7 @@ namespace Examples\Transmisson;
require_once (dirname(__FILE__).'/../bootstrap.php');
//pull in API key config
-$configFile = file_get_contents(dirname(__FILE__) . "/../example-config.json");
+$configFile = file_get_contents(dirname(__FILE__) . '/../example-config.json');
$config = json_decode($configFile, true);
use SparkPost\SparkPost;
@@ -15,36 +15,36 @@ $sparky = new SparkPost($httpAdapter, ['key'=>$config['api-key']]);
try{
$results = $sparky->transmission->send([
- "campaign"=>"my-campaign",
- "metadata"=>[
- "sample_campaign"=>true,
- "type"=>"these are custom fields"
- ],
- "substitutionData"=>[
- "name"=>"Test Name"
- ],
- "description"=>"my description",
- "replyTo"=>"reply@test.com",
- "customHeaders"=>[
- "X-Custom-Header"=>"Sample Custom Header"
- ],
- "trackOpens"=>false,
- "trackClicks"=>false,
- "from"=>"From Envelope <from@sparkpostbox.com>",
- "html"=>"<p>Hello World! Your name is: {{name}}</p>",
- "text"=>"Hello World!",
- "subject"=>"Example Email: {{name}}",
- "recipients"=>[
- [
- "address"=>[
- "email"=>"john.doe@example.com"
+ 'campaign'=>'my-campaign',
+ 'metadata'=>[
+ 'sample_campaign'=>true,
+ 'type'=>'these are custom fields'
+ ],
+ 'substitutionData'=>[
+ 'name'=>'Test Name'
+ ],
+ 'description'=>'my description',
+ 'replyTo'=>'reply@test.com',
+ 'customHeaders'=>[
+ 'X-Custom-Header'=>'Sample Custom Header'
+ ],
+ 'trackOpens'=>false,
+ 'trackClicks'=>false,
+ 'from'=>'From Envelope <from@sparkpostbox.com>',
+ 'html'=>'<p>Hello World! Your name is: {{name}}</p>',
+ 'text'=>'Hello World!',
+ 'subject'=>'Example Email: {{name}}',
+ 'recipients'=>[
+ [
+ 'address'=>[
+ 'email'=>'john.doe@example.com'
]
- ]
- ]
- ]);
+ ]
+ ]
+ ]);
- echo 'Congrats you can use your SDK!';
+ echo 'Congrats you can use your SDK!';
} catch (\Exception $exception) {
- echo $exception->getMessage();
+ echo $exception->getMessage();
}
?>