作者 Your Name
... ... @@ -81,18 +81,19 @@ class EmailController extends BaseController
'host.regex' => 'smtp格式错误',
'from_name.required' => '发信人昵称必须',
]);
$this->param['project_id'] = $this->project['id'];
$info = $smtp->read(['project_id' => $this->project['id']]);
if (!$info) {
$smtp->add($this->param);
} else {
$smtp->edit($this->param, ['project_id' => $this->param['project_id']]);
$smtp->edit($this->param, ['project_id' => $this->project['id']]);
}
$this->response('success');
}
public function get_smtp(Smtp $smtp){
$info = $smtp->read(['project_id' => $this->project['id']]);
$this->response($info);
$this->response($info??[]);
}
public function group_send(GroupSendTask $groupSendTask)
... ...