first commit
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
<?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");
|
||||
}
|
||||
|
||||
require_once $vendorPath;
|
||||
|
||||
// Controlla classi
|
||||
use Dotenv\Dotenv;
|
||||
use PHPMailer\PHPMailer\PHPMailer;
|
||||
use PHPMailer\PHPMailer\Exception;
|
||||
|
||||
// ✅ Caricamento variabili .env
|
||||
$dotenv = Dotenv::createImmutable($rootPath);
|
||||
$dotenv->load();
|
||||
|
||||
error_log("✅ Variabili .env caricate: " . print_r($_ENV, true));
|
||||
Reference in New Issue
Block a user