<table id="mail-list" class="table table-striped">
    <thead>
        <tr>
            <th><i class="fa fa-check"></i></th>
            <th>Absender</th>
            <th>Empfänger</th>
            <th>Betreff</th>
            <th><a id="refresh-mails" href="#"><i class="fa fa-refresh"></i></a></th>
        </tr>
    </thead>
<?php

if($this->_['mails']) {
    foreach($this->_['mails'] as $mail) {
        $checked = "";
        if($mail->getProcessed() == 1) {
            $checked = "checked";
        }

        echo '<tr>';
        echo '<td><input type="checkbox" value="1" ' . $checked . ' id="mail-processed-' . $mail->getID() . '" class="mail-processed"></td>';
        echo '<td>' . $mail->getMailSender() . '</td>';
        echo '<td>' . $mail->getMailRecipient() . '</td>';
        echo '<td>' . $mail->getSubject() . '</td>';
        echo '<td><a href="#" data-mail-id="' . $mail->getID() . '" class="reply-mail"><i class="fa fa-reply"></i></a></td>';
        echo '</tr>';
    }
}
?>
</table>
