liugc 1 year ago
parent
commit
c4bbf30e29
1 changed files with 2 additions and 1 deletions
  1. 2 1
      app/common/command/SendBxMail.php

+ 2 - 1
app/common/command/SendBxMail.php

@@ -38,9 +38,10 @@ class SendBxMail extends Command
         // 文件路径 - 替换为你的实际文件路径
         // 文件路径 - 替换为你的实际文件路径
         //$filePath = 'uploads/baoxian/20250327职业责任险投保清单.xlsx';
         //$filePath = 'uploads/baoxian/20250327职业责任险投保清单.xlsx';
         $excelFile = $this->getExcelFile();
         $excelFile = $this->getExcelFile();
+        if(empty($excelFile)) throw new \Exception("邮件发送失败. 错误信息: 路径不存在-101");
         $filePath = $excelFile[0];
         $filePath = $excelFile[0];
         $filename = $excelFile[1];
         $filename = $excelFile[1];
-        if(empty($filePath)) throw new \Exception("邮件发送失败. 错误信息: 路径不存在");
+        if(empty($filePath)) throw new \Exception("邮件发送失败. 错误信息: 路径不存在-102");
 
 
         $mail = new PHPMailer(true);
         $mail = new PHPMailer(true);