F
Filamentβ€’9mo ago
Android63

Initial email verification message not being sent

I have email verification enabled in my AdminPanelProvider class:
return $panel
->login()
->passwordReset()
->emailVerification()
return $panel
->login()
->passwordReset()
->emailVerification()
Running locally and in production, when I try to log in as a user who isn't verified I see the standard message:
Verify your email address
We've sent an email to [email protected] containing instructions on how to verify your email address.

Not received the email we sent?
Resend it.
Verify your email address
We've sent an email to [email protected] containing instructions on how to verify your email address.

Not received the email we sent?
Resend it.
There's no sign of the verification message but, when I click the link to resend, it goes straight through no problem. In accordance with the Laravel docs, my User model has MustVerifyEmail and notifiable enabled:
<?php

namespace App\Models;

use Filament\Models\Contracts\FilamentUser;
use Filament\Models\Contracts\HasAvatar;
use Filament\Panel;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\HasOneThrough;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use Laravel\Sanctum\HasApiTokens;
use Illuminate\Database\Eloquent\SoftDeletes;
use OwenIt\Auditing\Contracts\Auditable;
use Spatie\Permission\Traits\HasRoles;
use Illuminate\Contracts\Auth\MustVerifyEmail;

class User extends Authenticatable implements FilamentUser, Auditable, MustVerifyEmail, HasAvatar
{
use HasApiTokens;
use HasFactory;
use SoftDeletes;
use Notifiable;
use \OwenIt\Auditing\Auditable;
use HasRoles;
<?php

namespace App\Models;

use Filament\Models\Contracts\FilamentUser;
use Filament\Models\Contracts\HasAvatar;
use Filament\Panel;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\HasOneThrough;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use Laravel\Sanctum\HasApiTokens;
use Illuminate\Database\Eloquent\SoftDeletes;
use OwenIt\Auditing\Contracts\Auditable;
use Spatie\Permission\Traits\HasRoles;
use Illuminate\Contracts\Auth\MustVerifyEmail;

class User extends Authenticatable implements FilamentUser, Auditable, MustVerifyEmail, HasAvatar
{
use HasApiTokens;
use HasFactory;
use SoftDeletes;
use Notifiable;
use \OwenIt\Auditing\Auditable;
use HasRoles;
My EventServiceProvider has the required listener:
class EventServiceProvider extends ServiceProvider
{
/**
* The event to listener mappings for the application.
*
* @var array<class-string, array<int, class-string>>
*/
protected $listen = [
Registered::class => [
SendEmailVerificationNotification::class,
],
];
class EventServiceProvider extends ServiceProvider
{
/**
* The event to listener mappings for the application.
*
* @var array<class-string, array<int, class-string>>
*/
protected $listen = [
Registered::class => [
SendEmailVerificationNotification::class,
],
];
Any clues?
No description
2 Replies
Jonay.Medina
Jonay.Medinaβ€’9mo ago
Hello, did you manage to solve it? In another post, a user posted the solution that worked for me
No. Laravel has made QUEUE_CONNECTION=database the default since version 11. In Laravel 10 this parameter was QUEUE_CONNECTION=sync.

QUEUE_CONNECTION=sync - means that all tasks will be executed synchronously without a queue.

QUEUE_CONNECTION=database - means that all tasks will be added to the queue in the job table and executed only when the php artisan queue:work queue is running.

I returned the value QUEUE_CONNECTION=sync and emails began to be sent immediately.
No. Laravel has made QUEUE_CONNECTION=database the default since version 11. In Laravel 10 this parameter was QUEUE_CONNECTION=sync.

QUEUE_CONNECTION=sync - means that all tasks will be executed synchronously without a queue.

QUEUE_CONNECTION=database - means that all tasks will be added to the queue in the job table and executed only when the php artisan queue:work queue is running.

I returned the value QUEUE_CONNECTION=sync and emails began to be sent immediately.
Nils Domin
Nils Dominβ€’8mo ago
That works for me, too. Thanks! πŸ˜ƒ
Want results from more Discord servers?
Add your server