浏览代码

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

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;
}
}
}



正在加载...
取消
保存