id = $id; $this->nodeName = $nodeName; $this->nodeServer = $nodeServer; } public function build() { return $this->view('emails.nodeCrashWarning')->subject('节点离线警告')->with([ 'nodeName' => $this->nodeName, 'nodeServer' => $this->nodeServer ]); } // 发件失败处理 public function failed(\Exception $e) { EmailLog::query()->where('id', $this->id)->update(['status' => -1, 'error' => $e->getMessage()]); } }