| @@ -2,6 +2,7 @@ | |||||
| namespace App\Logic; | namespace App\Logic; | ||||
| use App\Codes\EnvironmentName; | |||||
| use App\Events\Email\ConfirmEvent; | use App\Events\Email\ConfirmEvent; | ||||
| use App\Exceptions\AppCommonException; | use App\Exceptions\AppCommonException; | ||||
| use App\Email\BaseEmailer; | use App\Email\BaseEmailer; | ||||
| @@ -10,6 +11,7 @@ use App\Models\EmailAttachment; | |||||
| use Exception; | use Exception; | ||||
| use Illuminate\Database\Eloquent\Collection; | use Illuminate\Database\Eloquent\Collection; | ||||
| use Illuminate\Support\Carbon; | use Illuminate\Support\Carbon; | ||||
| use Illuminate\Support\Str; | |||||
| use Validator; | use Validator; | ||||
| class EmailManager | class EmailManager | ||||
| @@ -103,6 +105,15 @@ class EmailManager | |||||
| public function confirm() | public function confirm() | ||||
| { | { | ||||
| if (app()->environment([EnvironmentName::LOCAL->value])) { | |||||
| $email = $this->model->email; | |||||
| if (!Str::endsWith($email, ['@sute.jp', '@satellite-tech.co.jp'])) { | |||||
| info(sprintf("ローカル環境Email送信対象外アドレスのため、メール送信スキップ [%s]", $email)); | |||||
| return; | |||||
| } | |||||
| } | |||||
| $validator = Validator::make(['email' => $this->model->email], [ | $validator = Validator::make(['email' => $this->model->email], [ | ||||
| 'email' => ['required', 'email:strict,dns'] | 'email' => ['required', 'email:strict,dns'] | ||||
| ]); | ]); | ||||