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

hiviyan's avatar

After implementing laravel/ui with Larave 11, the reset password function does not send email.

I am trying to use laravel/ui with Laravel 11. I managed to get it working fine except for one issue. When I try to reset my password, it is supposed to send email to a registed email. But, I never received any email. Also, I did not get any error message too. Did any one get the same issue? I assume that laravel/ui should work with Laravel 11. But, maybe, it is not the best idea to use laravel/ui with Laravel 11.

0 likes
4 replies
LaryAI's avatar
Level 58

It sounds like you're facing an issue with the email sending functionality in Laravel 11 after integrating the laravel/ui package. Here are a few steps you can take to troubleshoot and potentially resolve the issue:

1. Environment Configuration

Ensure that your .env file is correctly configured for mail functionality. Here's a basic setup if you're using SMTP:

MAIL_MAILER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS=null
MAIL_FROM_NAME="${APP_NAME}"

Replace the placeholders with your actual mail server details. For local development, you might want to use a service like Mailtrap to catch outgoing emails.

2. Mail Configuration

Check your config/mail.php to ensure it aligns with your .env settings. Laravel uses these settings to configure the mailer.

3. Test Email Sending

Before diving deeper, verify that Laravel can send emails. You can quickly test this by using a route:

Route::get('/test-mail', function () {
    \Mail::raw('Hello, this is a test mail!', function ($message) {
        $message->to('[email protected]')->subject('Test Mail');
    });

    return 'Mail sent!';
});

Visit this route in your browser or use a tool like Postman to trigger it and check if you receive the email.

4. Check Password Reset Mails

If the basic test mail works, the issue might be with the password reset mail configuration. Ensure that the password reset notifications are set up correctly. In Laravel, this is typically handled by the User model which should use the Illuminate\Notifications\Notifiable trait and the Illuminate\Auth\Passwords\CanResetPassword trait.

5. Check Queue Worker

If you are using queues to send email (which is common in production for performance reasons), ensure your queue worker is running. You can check this by running:

php artisan queue:work

If you're not using queues, skip this step.

6. Error Logging

Since you mentioned not seeing any errors, make sure your logging is set up correctly in config/logging.php and check the logs after attempting a password reset. This can provide clues if something is going wrong.

7. Laravel/UI Compatibility

Finally, while laravel/ui is generally compatible with Laravel 11, ensure you have followed all upgrade guides and haven't missed any steps specific to Laravel 11 when setting up laravel/ui.

If after all these steps the issue persists, consider checking for open issues on the Laravel/UI GitHub repository or seeking further assistance in the Laravel community forums.

martinbean's avatar

When I try to reset my password, it is supposed to send email to a registed email. But, I never received any email.

@hiviyan We need far more detail and context.

Where is your application hosted? What mail driver are you using to send emails?

hiviyan's avatar
hiviyan
OP
Best Answer
Level 8

I think that I may have foudn the solution. Not sure if this is what happened as I tried so many things on my Laravel environment having this email not being sent. But, hopefully, this will give some insight on what happened.

Basicaly, I ran the command to use Laravel/UI with Bootstrap.

composer require laravel/ui
php artisan ui bootstrap --auth
npm run dev

Please or to participate in this conversation.