$config['api-key']]); try { $results = $sparky->transmission->send([ 'from' => [ 'name' => 'From Envelope', 'email' => 'from@sparkpostbox.com', ], 'html' => '
An example email using cc with SparkPost to the {{recipient_type}} recipient.
', 'text' => 'An example email using cc with SparkPost to the {{recipient_type}} recipient.', 'subject' => 'Example email using cc', 'recipients' => [ [ 'address' => [ 'name' => 'Original Recipient', 'email' => 'original.recipient@example.com', ], 'substitution_data' => [ 'recipient_type' => 'Original' ] ], [ 'address' => [ 'name' => 'Carbon Copy Recipient', 'email' => 'cc.recipient@example.com', 'header_to' => '"Original Recipient"