<section class="flex flex-col gap-4">
    <h3 class="text-2xl font-semibold">
        Recently Sent Emails
    </h3>
    <table class="min-w-full">
        <thead>
            <tr>
                <th class="py-2">
                    To
                </th>
                <th class="py-2">
                    From
                </th>
                <th class="py-2">
                    Subject
                </th>
                <th class="py-2">
                    Created At
                </th>
            </tr>
        </thead>
        <tbody>
            {% for email in recent_emails %}
                <tr>
                    <td class="border px-4 py-2">
                        {{ email.to_email }}
                    </td>
                    <td class="border px-4 py-2">
                        {{ email.from_email }}
                    </td>
                    <td class="border px-4 py-2">
                        {{ email.subject }}
                    </td>
                    <td class="border px-4 py-2">
                        {{ email.created_at }}
                    </td>
                </tr>
            {% else %}
                <tr>
                    <td class="border px-4 py-2" colspan="4">
                        No recent emails found.
                    </td>
                </tr>
            {% endfor %}
        </tbody>
    </table>
</section>
