vemcogroup / laravel-sparkpost-driver

SparkPost driver to use with Laravel
MIT License
40 stars 16 forks source link

Adding Metadata to Transmissions? #33

Closed danhanly closed 8 months ago

danhanly commented 11 months ago

Hi,

I can't find a way for me to add metadata to the transmissions using this driver.

Is this supported?

The sparkpost API supports adding metadata, but I can't find a way for it to work through the driver: https://developers.sparkpost.com/api/transmissions/#transmissions-create-a-transmission

Thanks for your help.

danijelk commented 8 months ago

As I see it you should be able to use the $options param, either in constructor or with the setOptions() method.

which is used at the end in a merge 'json' => array_merge([ 'recipients' => $recipients, 'content' => $content, ], $this->options), ]);