<!DOCTYPE html>
<html>
<head>
    <title>Upload EML File</title>
</head>
<body>
    <h2>Upload an EML File to Convert to Excel</h2>

    @if ($errors->any())
        <div style="color:red;">
            <ul>
                @foreach ($errors->all() as $error)
                    <li>{{ $error }}</li>
                @endforeach
            </ul>
        </div>
    @endif

    <form action="/convert-eml" method="POST" enctype="multipart/form-data">
        @csrf
        <label for="eml_file">Choose EML file:</label>
        <input type="file" name="eml_file" accept=".eml" required>
        <br><br>
        <button type="submit">Convert to Excel</button>
    </form>
</body>
</html>
