<table style="margin-top:20px">
    <thead>
        <tr>
            <th></th>
            <th>{$i.inoutbox_date}</th>
            <th>{$i.inoutbox_subject}</th>
            <th style="min-width: 500px">{$i.inoutbox_sender} / {$i.inoutbox_recipient}</th>
        </tr>
    </thead>
    <tbody>
        <div style="margin-top:5px" class="warningsmall ui-corner-all">
            {$i.inoutbox_delete_eml_msg}
        </div>
        
        {foreach from=$data key=email_hash item=email}
        <tr>
            <td>
                <span class="dialog_make_btn16 smallbtns delete ui-corner-all" onclick="basicForm.selectable_row.unselect_from_dlg('email_allocation','{$email_hash}', $(this).closest('tr'));"></span>
            </td>
            <td>{$email->date->us_date_time()}</td>
            <td>{$email->subject}</td>  
            <td> 
                {if $email->is_mail_out === TRUE}
                    {if $email->to}
                        {us_htmlentities($email->to, ENT_NOQUOTES)}
                    {/if}                        
                {else} 
                    {if $email->from}
                        {us_htmlentities($email->from, ENT_NOQUOTES)}
                    {/if}    
                {/if}  
            </td> 
        </tr>
        {/foreach}
    </tbody>
</table>