Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

chris_boudreaux's avatar

Mailgun is not sending password reset emails requested via API. No errors thrown. Laravel v5.6

I can not get Mailgun to receive password reset email requests through the Laravel out-of-the-box API.

When a user submits the password reset form, Laravel returns a success message to the user, but the Mailgun dashboard shows no emails sent, and no email is received by the user.

I receive no errors in Laravel and no errors are written to Laravel.log

Mailgun dashboard shows zero outbound emails sent from the domain, which leads me to believe that maybe it is not receiving the api calls??

The same issue occurs identically in my local dev environment on Mamp on my Mac, and in production on Digital Ocean with Forge -- both using identical Mailgun settings.

I am trying to work my way through the code to find the issue, an am stuck on where to look next.

When I log $notifiable from "public function toMail($notifiable)" in ResetPassword.php, i see that $notifiable has all the values it should have.

.env variables are set:

MAIL_DRIVER=mailgun MAIL_DOMAIN=.com MAILGUN_SECRET=key-...

Services.php is set:

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

Mail.php is set:

'driver' => env('MAIL_DRIVER', 'smtp'), 'host' => env('MAIL_HOST', 'smtp.mailgun.org'), 'port' => env('MAIL_PORT', 587), 'from' => [ 'address' => env('MAIL_FROM_ADDRESS', '[email protected]'), 'name' => env('MAIL_FROM_NAME', 'Support'), ], 'encryption' => env('MAIL_ENCRYPTION', 'tls'), 'username' => env('MAIL_USERNAME'), 'password' => env('MAIL_PASSWORD'),

Guzzle is installed and composer is updated.

I have a fully updated version of Laravel 5.6 running on Digital Ocean, and locally on Mac. This is my second Laravel app running on the same infrastructure. The first app sends emails fine through Mailgun, running on the same Mailgun account, using the same API secret.

Can anyone suggest where to look next? Thanks very much!

0 likes
5 replies
36864's avatar

I'm fairly sure those emails are queued and then handled by your queue worker. What type of queue are you using?

chris_boudreaux's avatar

QUEUE_DRIVER=sync

This is the same for both my working and non-working apps. And the queue.php files have the same contents, in both apps.

chris_boudreaux's avatar

I also tried the database Queue driver, including running:

php artisan queue:table php artisan migrate

... but am getting the same result as with 'sync'.

36864's avatar

Would you mind explaining what you did to solve this for anyone who searches for this problem in the future?

P.S: Sorry I couldn't be of much help, mailgun isn't exactly my area of expertise.

Please or to participate in this conversation.