Replies: 4 comments
-
I understand that you are facing an issue with sending the user verification email, but this shouldn’t be a framework bug. If I were you, I would first open a discussion or post on the Laravel community. |
Beta Was this translation helpful? Give feedback.
-
https://laravel.com/docs/12.x/verification |
Beta Was this translation helpful? Give feedback.
-
Have you checked the |
Beta Was this translation helpful? Give feedback.
-
Yes, as per the text above, it doesn't send an email because both of the
conditions are false. I have tested the mail code and it works.
I have solved the issue by adding a function to the user model, but nowhere
in the guidance does it say that, and the failure to return an error and
the lack of accuracy in the guidance seems to be an issue. I lost a good
day on this, and I'd prefer it addressed.
…On Fri, 10 Oct 2025 at 10:42, Dasun Tharanga ***@***.***> wrote:
*dasundev* left a comment (laravel/framework#57331)
<#57331 (comment)>
Have you checked the laravel.log? If it shows nothing, I guess you might
not be using the correct MAIL_MAILER in your .env file.
—
Reply to this email directly, view it on GitHub
<#57331 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAEEF4IFVYCZVSZZDGI2XGD3W55PDAVCNFSM6AAAAACI2ENI6CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTGOBZGEYDINJWGI>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Laravel Version
12
PHP Version
8.4.3
Database Driver & Version
PostGres 16.9
Description
Hello,
I am new to laravel so this is potentially not an error, but it appears strangely coded.
I am using laravel with no starter kits or add ons, just the standard code base.
I am trying to send the user a verifyEmail when they register (as per https://laravel.com/docs/12.x/verification). The user model and controller are basically copies of the code on that page.
The view (register) completes, and the user is in the database. No email is received (and my email works in both send and queue as I've tested separately).
There issue seems to be in this section of code
Which is in vendor/laravel/framework/src/Illuminate/Notifications/Channels/MailChannel.php
The message is not an instanceof mailable, because it's mailMessage (as per the buildMailMessage function in vendor/laravel/framework/src/Illuminate/Auth/Notifications/VerifyEmail.php
routeNotificationFor calls a function "method_exists", which looks for a function called "routeNotificationForMail" but the only functions with that name are in test libraries.
Steps To Reproduce
Install Laravel 12
in web.php
Route::get("/register", [ RegisteredUserController::class, 'create']);
Route::post("/register", [ RegisteredUserController::class, 'store']);
RegisteredUserController.php
User.php
register.blade.php
No email is sent, email has been tested using other code
Beta Was this translation helpful? Give feedback.
All reactions