1

I'm trying to create a email verification for my laravel application. For this I've setup a new job with this content:

class SendVerificationEmail implements ShouldQueue
{
    use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;

    protected $user;

    public function __construct($user)
    {
        $this->user = $user;
    }

    public function handle()
    {
        $email = new EmailVerification($this->user);
        Mail::to($this->user->email)->send($email);
    }
}

This dose not work's. If I run php artisan queue:work and execute the job the console tells me this in an endless loop:

[2018-03-26 15:50:25][1] Processing: App\Jobs\SendVerificationEmail
[2018-03-26 15:50:26][2] Processing: App\Jobs\SendVerificationEmail
[2018-03-26 15:50:26][3] Processing: App\Jobs\SendVerificationEmail
[2018-03-26 15:50:26][...] Processing: App\Jobs\SendVerificationEmail

What's wrong? My SMTP settings are up to date.

Markus
  • 407
  • 2
  • 9
  • 25
  • And if you manually send mail? Will it work? Does your log has any entries connected with this problem? – Pavel Mar 26 '18 at 16:00

0 Answers0