LaravelSparkpost integration with Laravel 5.4


Laravel 5.4 comes preinstalled with sparkpost api lib. Sparkpost lib requires secret key which one can find from their sparkpost account.

SAMPLE .env file data

To successfully create a sparkpost email api setup, add the below details to env file and your application will be good to start sending emails.


NOTE: The above details does not give you the code written in controller which has the business logic to send emails using laravels Mail::send function.