@echo off
REM PHPMailer Installation Script for Windows
REM Run this in Command Prompt from C:\xampp\htdocs\interior\

echo.
echo ========================================
echo PHPMailer Installation Script
echo ========================================
echo.

REM Check if Composer is installed
where composer >nul 2>nul
if errorlevel 1 (
    echo ERROR: Composer is not installed!
    echo Please download and install from: https://getcomposer.org/
    echo.
    pause
    exit /b 1
)

echo Installing PHPMailer...
echo.

composer require phpmailer/phpmailer

if errorlevel 1 (
    echo.
    echo ERROR: Installation failed!
    pause
    exit /b 1
)

echo.
echo ========================================
echo Installation Complete!
echo ========================================
echo.
echo Next steps:
echo 1. Edit auth-system\PHPMailerConfig.php
echo 2. Add your SMTP credentials (Gmail, Outlook, etc.)
echo 3. Test with: http://localhost/interior/auth-system/register.php
echo.
pause
