<?php

namespace App\Jobs;

use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Queue\Queueable;
use Illuminate\Support\Facades\Mail;
use App\Mail\WelcomeEmail;
use DB;

class ProcessWelcomeEmail implements ShouldQueue
{
    use Queueable;
	public $mailData;

    /**
     * Create a new job instance.
     */
    public function __construct($mailData)
    {
        $this->mailData=$mailData;
    }

    /**
     * Execute the job.
     */
    public function handle(): void
    {
		Mail::to($this->mailData['Email'])->send(new WelcomeEmail($this->mailData));
    }
}
