From bfa2cfc3f84b517f496f63f1a45843ba49f9b76a Mon Sep 17 00:00:00 2001 From: Myron Blair Date: Mon, 8 Jun 2026 04:40:16 +0000 Subject: [PATCH] fix: CyberMail from field format + deploy runner syncs api/ and lib/ - Notifier.php + test-notify: use plain email address in 'from' field (CyberMail rejects "Name " format) - deploy-runner.sh: rsync panel/api/ and panel/lib/ to web root after panel/public/ sync; also syncs panel/bin/ to /opt/novacpx/bin/ Co-Authored-By: Claude Sonnet 4.6 --- deploy/deploy-runner.sh | 8 ++++++++ panel/api/endpoints/system.php | 2 +- panel/lib/Notifier.php | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/deploy/deploy-runner.sh b/deploy/deploy-runner.sh index 7d8b3f8..3f6f725 100644 --- a/deploy/deploy-runner.sh +++ b/deploy/deploy-runner.sh @@ -59,6 +59,14 @@ while IFS='|' read -r REPO_PATH WEB_ROOT COMMIT; do --exclude='*.log' \ "$REPO_PATH/panel/public/" "$WEB_ROOT/" >> "$LOG" 2>&1 + # Sync backend API and lib (not in panel/public, deployed separately) + rsync -av --delete --exclude='config.php' "$REPO_PATH/panel/api/" "$WEB_ROOT/api/" >> "$LOG" 2>&1 + rsync -av --delete "$REPO_PATH/panel/lib/" "$WEB_ROOT/lib/" >> "$LOG" 2>&1 + + # Sync cron scripts to bin directory + rsync -av "$REPO_PATH/panel/bin/" /opt/novacpx/bin/ >> "$LOG" 2>&1 + chmod +x /opt/novacpx/bin/*.php 2>/dev/null || true + # Run pending DB migrations MIGR_DIR="$REPO_PATH/db/migrations" if [[ -d "$MIGR_DIR" ]]; then diff --git a/panel/api/endpoints/system.php b/panel/api/endpoints/system.php index d281eb7..41fcc4c 100644 --- a/panel/api/endpoints/system.php +++ b/panel/api/endpoints/system.php @@ -449,7 +449,7 @@ match ($action) { if (!$apiKey) Response::error("No CyberMail API key configured"); $payload = json_encode([ - 'from' => "$fromName <$fromEmail>", + 'from' => $fromEmail, 'to' => $to, 'subject' => 'NovaCPX — test notification', 'html' => '

Test Notification

Email notifications are working correctly from your NovaCPX panel.

', diff --git a/panel/lib/Notifier.php b/panel/lib/Notifier.php index 1ef944c..7671dd0 100644 --- a/panel/lib/Notifier.php +++ b/panel/lib/Notifier.php @@ -18,7 +18,7 @@ class Notifier { if (!$apiKey || !$to) return false; $payload = json_encode([ - 'from' => "$fromName <$fromEmail>", + 'from' => $fromEmail, 'to' => $to, 'subject' => $subject, 'html' => $html,