Changeset View
Changeset View
Standalone View
Standalone View
src/app/Jobs/SignupApprovalEmail.php
- This file was added.
<?php | |||||
namespace App\Jobs; | |||||
class SignupApprovalEmail extends UserJob | |||||
{ | |||||
/** | |||||
* Execute the job. | |||||
* | |||||
* @return void | |||||
*/ | |||||
public function handle() | |||||
{ | |||||
$user = $this->getUser(); | |||||
if (!$user) { | |||||
return; | |||||
} | |||||
$email = $user->getSetting('external_email'); | |||||
if (!$email) { | |||||
return; | |||||
} | |||||
Mail::to($email)->send(new SignupApproval($user)); | |||||
} | |||||
} |