Sending a verification mail as I create a new user in Laravel - Hack The Tech - Latest News related to Computer and Technology

Hack The Tech - Latest News related to Computer and Technology

Get Daily Latest News related to Computer and Technology and hack the world.

Monday, November 20, 2023

Sending a verification mail as I create a new user in Laravel

I have a users module in Filament and I can create a new user in that panel. My aim is to send verification mail automatically.

As far as I know Filament sends a verification mail when MustVerifyEmail is extended:

class User extends Authenticatable implements FilamentUser, MustVerifyEmail
{
    use HasApiTokens, HasFactory, Notifiable, HasRoles;

Filament form schema is like this:

TextInput::make("email")
    ->maxLength(255)
    ->rules(['email'])
    ->unique(ignorable: fn ($record) => $record)
    ->filled(),

When I create a new user, it doesn't send a verification mail. To test STMP, I tried forgot password email, it works well.

What am I missing?



source https://stackoverflow.com/questions/77511972/sending-a-verification-mail-as-i-create-a-new-user-in-laravel

No comments:

Post a Comment