소스 검색

テスト用にメール送信先を書き換え処理追加

master
sosuke.iwabuchi 1 년 전
부모
커밋
a2e29ae0e6
1개의 변경된 파일9개의 추가작업 그리고 3개의 파일을 삭제
  1. +9
    -3
      app/Logic/EmailManager.php

+ 9
- 3
app/Logic/EmailManager.php 파일 보기

@@ -125,9 +125,15 @@ class EmailManager
if (app()->environment([EnvironmentName::STAGING->value])) {
$email = $this->model->email;
if (!Str::endsWith($email, ['@satellite-tech.co.jp', '@sute.jp', '@kyoto-public.or.jp'])) {
// 送信NG
info(sprintf("ローカル環境Email送信対象外アドレスのため、メール送信スキップ [%s]", $email));
return;
$emailRewrite = config('mail.developmentEmail');
if ($emailRewrite) {
// 送信先書き換え
$this->model->email = $emailRewrite;
} else {
// 送信NG
info(sprintf("ステージング環境Email送信対象外アドレスのため、メール送信スキップ [%s]", $email));
return;
}
}
}



Loading…
취소
저장