diff options
author | Vincent Song <vincent.wsong@gmail.com> | 2016-06-10 15:17:46 -0400 |
---|---|---|
committer | Vincent Song <vincent.wsong@gmail.com> | 2016-06-10 15:17:46 -0400 |
commit | e15e8eeffefe014248ee73145e6f9321c3484153 (patch) | |
tree | d37cec3cb3a12855f039fb3df74cc9f4ed4221c3 | |
parent | 247c3fe200d11b709a88215581332f6150da765e (diff) | |
download | php-sparkpost-e15e8eeffefe014248ee73145e6f9321c3484153.zip php-sparkpost-e15e8eeffefe014248ee73145e6f9321c3484153.tar.gz php-sparkpost-e15e8eeffefe014248ee73145e6f9321c3484153.tar.bz2 |
fixed minor bug
-rw-r--r-- | lib/SparkPost/Transmission.php | 46 |
1 files changed, 45 insertions, 1 deletions
diff --git a/lib/SparkPost/Transmission.php b/lib/SparkPost/Transmission.php index caffe45..805b0cb 100644 --- a/lib/SparkPost/Transmission.php +++ b/lib/SparkPost/Transmission.php @@ -104,9 +104,53 @@ class Transmission extends Resource { $modifiedPayload = $this->fixBlindCarbonCopy($payload); //Accounts for any BCCs $modifiedPayload = $this->fixCarbonCopy($modifiedPayload); //Accounts for any CCs - //return parent::post($modifiedPayload, $this->customHeaders); + return parent::post($modifiedPayload, $this->customHeaders); } } + +$testPayload = +[ + 'content' => [ + 'from' => [ + 'name' => 'Sparkpost Team', + 'email' => 'from@sparkpostbox.com', + ], + 'subject' => 'First Mailing From PHP', + 'html' => '<html><body><h1>Congratulations, {{name}}!</h1><p>You just sent your very first mailing!</p></body></html>', + 'text' => 'Congratulations, {{name}}!! You just sent your very first mailing!', + ], + 'substitution_data' => ['name' => 'YOUR_FIRST_NAME'], + 'recipients' => [ + [ + 'address' => 'EMAIL_ADDRESS1', + 'name' => 'NAME_1' + ], + ], + 'bcc' => [ + [ + 'address' => 'BCC_EMAIL_ADDRESS1', + 'name' => 'BCC_NAME1' + ], + [ + 'address' => 'BCC_EMAIL_ADDRESS2', + 'name' => 'BCC_NAME2' + ], + ], + 'cc' => [ + [ + 'address' => 'CC_EMAIL_ADDRESS1', + 'name' => 'CC_NAME1' + ], + [ + 'address' => 'CC_EMAIL_ADDRESS2', + 'name' => 'CC_NAME2' + ], + [ + 'address' => 'CC_EMAIL_ADDRESS3', + ] + ] ]; +$transmission = new Transmission(); +$transmission->post($testPayload); ?>
\ No newline at end of file |