fixed mailer class

This commit is contained in:
2026-09-04 10:03:38 +02:00
parent 83af2e2d17
commit b8957a8a24
15 changed files with 479 additions and 631 deletions
-6
View File
@@ -1,14 +1,10 @@
<?php
// Debug iniziale
error_log("== Inizio mailer.php ==");
// Percorso assoluto alla root (es. /home/wnunknek/yogibook.yogasoul.it/)
$rootPath = dirname(__DIR__, 2);
error_log("Root path: $rootPath");
// Percorso al vendor
$vendorPath = $rootPath . '/vendor/autoload.php';
error_log("Vendor path: $vendorPath");
if (!file_exists($vendorPath)) {
die("❌ vendor/autoload.php non trovato in $vendorPath");
@@ -24,5 +20,3 @@ use PHPMailer\PHPMailer\Exception;
// ✅ Caricamento variabili .env
$dotenv = Dotenv::createImmutable($rootPath);
$dotenv->load();
error_log("✅ Variabili .env caricate: " . print_r($_ENV, true));