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,