Simple example for sending an email in PHP with SparkPost using sparkpost/php-sparkpost and guzzlehttp/guzzle packages.
More informations on https://github.com/SparkPost/php-sparkpost
Install Composer dependencies :
composer install
In index.php
:
- Replace YOUR_API_KEY by your SparkPost API key in
$key
- Replace variables by your informations