Getting 403 Error when sending an email with Laravel and Sparkpost

296 Views Asked by At

I get a 403 Forbidden response when attempting to send an email using Sparkpost from my Laravel 5.6 application. I added the Sparkpost api key to both the .env file and services.php file. Key is correct.

.env file:

enter code here
MAIL_DRIVER=sparkpost
SPARKPOST_SECRET=XXXXXXXXXXX

services.php file:

'sparkpost' => [
        'secret' => env('xxxxxxxxxx'),
    ],

What did I do wrong ?

0

There are 0 best solutions below