diff options
Diffstat (limited to 'examples/transmission/configuration_based.php')
-rw-r--r-- | examples/transmission/configuration_based.php | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/examples/transmission/configuration_based.php b/examples/transmission/configuration_based.php index 366434f..7f93b05 100644 --- a/examples/transmission/configuration_based.php +++ b/examples/transmission/configuration_based.php @@ -1,32 +1,32 @@ <?php namespace Examples\Transmisson; - require_once (dirname(__FILE__).'/../bootstrap.php'); +require_once (dirname(__FILE__).'/../bootstrap.php'); - use MessageSystems\SparkPost; - use MessageSystems\Transmission; +use MessageSystems\SparkPost; +use MessageSystems\Transmission; - $key = 'YOURAPIKEY'; - SparkPost::setConfig(['key'=>$key]); +$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!'; - 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"=>"jordan.nornhold@rackspace.messagesystems.com" - ] - ] - ] - ]); - echo 'Congrats you can use your SDK!'; - - var_dump(Transmission::$structure); - } catch (\Exception $exception) { - echo $exception->getMessage(); - } + var_dump(Transmission::$structure); +} catch (\Exception $exception) { + echo $exception->getMessage(); +} ?>
\ No newline at end of file |