Laravel - No emails sending using mailgun Laravel - No emails sending using mailgun laravel laravel

Laravel - No emails sending using mailgun


I think that in your config/services.php the mailgun.domain should be more likemg.domain.com (or sandboxXXXXXXX.mailgun.org if that's a dev environment), and not a url like the one you've set.


Try to put:

'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'), 

in your mailgun array.


I'm using laravel 5.8 and it's working with all default configuration

.env

MAIL_DRIVER=mailgunMAILGUN_DOMAIN=sandbox8a408833ad1540e7b3a5d0151f606531.mailgun.orgMAILGUN_SECRET=92df7e85eeeaccaeae3d3b3164600666-87cdd773-8c819599

web.php

Route::get('send_test_email', function(){    Mail::raw('Sending emails with Mailgun and Laravel is easy!', function($message)    {        $message->to('your_test_email@gmail.com');    });});

services.php

'mailgun' => [    'domain' => env('MAILGUN_DOMAIN'),    'secret' => env('MAILGUN_SECRET'),],