Changeset View
Changeset View
Standalone View
Standalone View
src/app/Jobs/PasswordResetEmail.php
<?php | <?php | ||||
namespace App\Jobs; | namespace App\Jobs; | ||||
use App\Mail\PasswordReset; | use App\Mail\PasswordReset; | ||||
use App\VerificationCode; | use App\VerificationCode; | ||||
use Illuminate\Bus\Queueable; | use Illuminate\Bus\Queueable; | ||||
use Illuminate\Contracts\Queue\ShouldQueue; | use Illuminate\Contracts\Queue\ShouldQueue; | ||||
use Illuminate\Foundation\Bus\Dispatchable; | use Illuminate\Foundation\Bus\Dispatchable; | ||||
use Illuminate\Support\Facades\Mail; | |||||
use Illuminate\Queue\SerializesModels; | use Illuminate\Queue\SerializesModels; | ||||
use Illuminate\Queue\InteractsWithQueue; | use Illuminate\Queue\InteractsWithQueue; | ||||
class PasswordResetEmail implements ShouldQueue | class PasswordResetEmail implements ShouldQueue | ||||
{ | { | ||||
use Dispatchable; | use Dispatchable; | ||||
use InteractsWithQueue; | use InteractsWithQueue; | ||||
use Queueable; | use Queueable; | ||||
Show All 35 Lines | class PasswordResetEmail implements ShouldQueue | ||||
* Execute the job. | * Execute the job. | ||||
* | * | ||||
* @return void | * @return void | ||||
*/ | */ | ||||
public function handle() | public function handle() | ||||
{ | { | ||||
$email = $this->code->user->getSetting('external_email'); | $email = $this->code->user->getSetting('external_email'); | ||||
Mail::to($email)->send(new PasswordReset($this->code)); | \App\Mail\Helper::sendMail( | ||||
new PasswordReset($this->code), | |||||
$this->code->user->tenant_id, | |||||
['to' => $email] | |||||
); | |||||
} | } | ||||
} | } |