diff options
Diffstat (limited to 'examples/transmission/stored_recipients_inline_content.php')
-rw-r--r-- | examples/transmission/stored_recipients_inline_content.php | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/examples/transmission/stored_recipients_inline_content.php b/examples/transmission/stored_recipients_inline_content.php index 9348f9b..8a605f5 100644 --- a/examples/transmission/stored_recipients_inline_content.php +++ b/examples/transmission/stored_recipients_inline_content.php @@ -15,17 +15,20 @@ $sparky = new SparkPost($httpAdapter, ['key'=>$config['api-key']]); try { - $results = $sparky->transmission->send([ - 'campaign'=>'my-campaign', - 'from'=>'From Envelope <from@sparkpostbox.com>', - 'html'=>'<p>Hello World! Your name is: {{name}}</p>', - 'text'=>'Hello World!', - 'subject'=>'Example Email: {{name}}', - 'recipientList'=>'Example List' - ]); + $results = $sparky->transmission->send([ + 'campaign'=>'my-campaign', + 'from'=>[ + 'name' => 'From Envelope', + 'email' => 'from@sparkpostbox.com>' + ], + 'html'=>'<p>Hello World! Your name is: {{name}}</p>', + 'text'=>'Hello World!', + 'subject'=>'Example Email: {{name}}', + 'recipientList'=>'Example List' + ]); - echo 'Congrats you can use your SDK!'; + echo 'Congrats you can use your SDK!'; } catch (\Exception $exception) { - echo $exception->getMessage(); + echo $exception->getMessage(); } ?> |