Laravel

Sparkpost integration with Laravel 5.4

Introduction#

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.

MAIL_DRIVER=sparkpost
SPARKPOST_SECRET=

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.


This modified text is an extract of the original Stack Overflow Documentation created by the contributors and released under CC BY-SA 3.0 This website is not affiliated with Stack Overflow