mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-11-10 04:50:50 +08:00
chore(notice): 规范修复与安装演练收尾
This commit is contained in:
@@ -29,15 +29,15 @@ class EmailChannel implements NoticeChannelInterface
|
||||
throw new RuntimeException('邮件发送失败: 渠道未启用(notify_email_enable != 1)');
|
||||
}
|
||||
|
||||
$host = (string) sysconfig('notify', 'notify_smtp_host');
|
||||
$port = (int) sysconfig('notify', 'notify_smtp_port');
|
||||
$secure = strtolower((string) sysconfig('notify', 'notify_smtp_secure'));
|
||||
$user = (string) sysconfig('notify', 'notify_smtp_user');
|
||||
$pass = (string) sysconfig('notify', 'notify_smtp_pass');
|
||||
$from = (string) sysconfig('notify', 'notify_smtp_from', 'notice@localhost');
|
||||
$host = (string) sysconfig('notify', 'notify_smtp_host');
|
||||
$port = (int) sysconfig('notify', 'notify_smtp_port');
|
||||
$secure = strtolower((string) sysconfig('notify', 'notify_smtp_secure'));
|
||||
$user = (string) sysconfig('notify', 'notify_smtp_user');
|
||||
$pass = (string) sysconfig('notify', 'notify_smtp_pass');
|
||||
$from = (string) sysconfig('notify', 'notify_smtp_from', 'notice@localhost');
|
||||
$fromName = (string) sysconfig('notify', 'notify_smtp_from_name');
|
||||
|
||||
$title = (string) ($notice['title'] ?? '');
|
||||
$title = (string) ($notice['title'] ?? '');
|
||||
$content = (string) ($notice['content'] ?? '');
|
||||
|
||||
$mailer = new PHPMailer(true);
|
||||
|
||||
@@ -34,11 +34,11 @@ class SmsChannel implements NoticeChannelInterface
|
||||
// 骨架驱动模拟发送:开关状态仅记入日志(关闭也恒成功),不拦截投递、不真实外呼
|
||||
$enabled = (int) sysconfig('notify', 'notify_sms_enable');
|
||||
Log::info('notice sms channel skeleton simulated send', [
|
||||
'channel' => self::name(),
|
||||
'enabled' => $enabled,
|
||||
'notice_id' => $notice['id'] ?? 0,
|
||||
'channel' => self::name(),
|
||||
'enabled' => $enabled,
|
||||
'notice_id' => $notice['id'] ?? 0,
|
||||
'target_addr' => $target['target_addr'] ?? '',
|
||||
'title' => $notice['title'] ?? '',
|
||||
'title' => $notice['title'] ?? '',
|
||||
]);
|
||||
|
||||
return true;
|
||||
|
||||
@@ -34,11 +34,11 @@ class WechatChannel implements NoticeChannelInterface
|
||||
// 骨架驱动模拟发送:开关状态仅记入日志(关闭也恒成功),不拦截投递、不真实外呼
|
||||
$enabled = (int) sysconfig('notify', 'notify_wechat_enable');
|
||||
Log::info('notice wechat channel skeleton simulated send', [
|
||||
'channel' => self::name(),
|
||||
'enabled' => $enabled,
|
||||
'notice_id' => $notice['id'] ?? 0,
|
||||
'channel' => self::name(),
|
||||
'enabled' => $enabled,
|
||||
'notice_id' => $notice['id'] ?? 0,
|
||||
'target_addr' => $target['target_addr'] ?? '',
|
||||
'title' => $notice['title'] ?? '',
|
||||
'title' => $notice['title'] ?? '',
|
||||
]);
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user