diff options
author | nornholdj <nornholdj@gmail.com> | 2014-11-04 18:00:01 -0500 |
---|---|---|
committer | nornholdj <nornholdj@gmail.com> | 2014-11-04 18:00:01 -0500 |
commit | fea870e7ce1a59accdb4e2e4be2c41170523d4c7 (patch) | |
tree | ca192a9ea0084b7f59807ff5fd3c262bb05ebb6d /examples/transmission/configuration_based.php | |
parent | 5d346d241fc0d0b565d7aa6ce0179a5da4c73dc0 (diff) | |
parent | 39f2699a7e7850397882a6d2ee3a8438a105b72d (diff) | |
download | php-sparkpost-fea870e7ce1a59accdb4e2e4be2c41170523d4c7.zip php-sparkpost-fea870e7ce1a59accdb4e2e4be2c41170523d4c7.tar.gz php-sparkpost-fea870e7ce1a59accdb4e2e4be2c41170523d4c7.tar.bz2 |
Merge branch 'release/1'
Diffstat (limited to 'examples/transmission/configuration_based.php')
-rw-r--r-- | examples/transmission/configuration_based.php | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/examples/transmission/configuration_based.php b/examples/transmission/configuration_based.php new file mode 100644 index 0000000..157d3f3 --- /dev/null +++ b/examples/transmission/configuration_based.php @@ -0,0 +1,30 @@ +<?php +namespace Examples\Transmisson; +require_once (dirname(__FILE__).'/../bootstrap.php'); + +use MessageSystems\SparkPost; +use MessageSystems\Transmission; + +$key = 'YOURAPIKEY'; +SparkPost::setConfig(['key'=>$key]); + +try { + $results = Transmission::send([ + "returnPath"=>"return@example.com", + "from"=>"From Envelope <from@example.com>", + "html"=>"<p>Hello World!</p>", + "text"=>"Hello World!", + "subject"=>"Example Email", + "recipients"=>[ + [ + "address"=>[ + "email"=>"john.doe@example.com" + ] + ] + ] + ]); + echo 'Congrats you can use your SDK!'; +} catch (\Exception $exception) { + echo $exception->getMessage(); +} +?>
\ No newline at end of file |