diff options
Diffstat (limited to 'examples/transmission/rfc822.php')
-rw-r--r-- | examples/transmission/rfc822.php | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/examples/transmission/rfc822.php b/examples/transmission/rfc822.php index 0635e15..b97bbb9 100644 --- a/examples/transmission/rfc822.php +++ b/examples/transmission/rfc822.php @@ -5,19 +5,19 @@ use SparkPost\SparkPost; use SparkPost\Transmission; $key = 'YOURAPIKEY'; -SparkPost::setConfig(['key'=>$key]); +SparkPost::setConfig(array('key'=>$key)); try { - $results = Transmission::send([ - 'recipients'=>[ - [ - 'address'=>[ + $results = Transmission::send(array( + 'recipients'=>array( + array( + 'address'=>array( 'email'=>'john.doe@sample.com' - ] - ] - ], - 'rfc822Part'=>"Content-Type: text/plain\nFrom: From Envelope <from@example.com>\nSubject: Example Email\n\nHello World" - ]); + ) + ) + ), + 'rfc822'=>"Content-Type: text/plain\nFrom: From Envelope <from@example.com>\nSubject: Example Email\n\nHello World" + )); echo 'Congrats you can use your SDK!'; } catch (\Exception $exception) { echo $exception->getMessage(); |