liugc vor 1 Jahr
Ursprung
Commit
c4bbf30e29
1 geänderte Dateien mit 2 neuen und 1 gelöschten Zeilen
  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';
         $excelFile = $this->getExcelFile();
+        if(empty($excelFile)) throw new \Exception("邮件发送失败. 错误信息: 路径不存在-101");
         $filePath = $excelFile[0];
         $filename = $excelFile[1];
-        if(empty($filePath)) throw new \Exception("邮件发送失败. 错误信息: 路径不存在");
+        if(empty($filePath)) throw new \Exception("邮件发送失败. 错误信息: 路径不存在-102");
 
         $mail = new PHPMailer(true);