<tal:block metal:use-macro="python:here.getFormsTool().getForm('site_admin_template').macros['page']">
<h1 metal:fill-slot="title" i18n:translate="">Bulk emails</h1>

<tal:block metal:fill-slot="section">
    <script type="text/javascript" src="/++resource++Products.Naaya/js/check_emails.js"></script>
    <script type="text/javascript" src="/++resource++Products.Naaya/js/view_check_emails.js"></script>

<div id="tabbedmenu">
<ul>
	<li><a tal:attributes="href string:${site_url}/admin_bulk_mail_html" i18n:translate="">Send new bulk email</a></li>
	<li><a tal:attributes="href string:${site_url}/admin_saved_bulk_emails" i18n:translate="">View sent emails</a></li>
</ul>
</div>
<div id="tabbedmenuend"></div>

<p i18n:translate=""><br/><br/><br/>Email addresses listed below are now one by one automatically checked for validity
(i.e. the email server is online and the address exists at there).
As this happens, each invalid address will change colour to red.</p>

<table class="datatable" tal:condition="email">
  <tr>
    <th i18n:translate="">Date</th>
    <td tal:content="python:here.utShowFullDateTime(email['date'])" />
  </tr>
  <tr>
    <th i18n:translate="">Sender</th>
    <td tal:content="email/sender" />
  </tr>
  <tr>
    <th i18n:translate="">Recipients</th>
    <td class="recipients-cell">
      <tal:block repeat="recipient email/recipients">
      <a tal:attributes="href string:mailto:${recipient};
                         title string:Send email to ${recipient}"
         tal:content="recipient"
         i18n:attributes="title" /><tal:block condition="not:repeat/recipient/last">, </tal:block>
      </tal:block>
    </td>
  </tr>
  <tr>
    <th i18n:translate="">Subject</th>
    <td tal:content="email/subject" />
  </tr>
  <tr>
    <th i18n:translate="">Content</th>
    <td tal:content="structure email/content" />
  </tr>
</table>

<div class="message-error" tal:condition="not:email">
  <p i18n:translate="">The requested email id was not found in the archive.</p>
</div>

<p><a title="Back to bulk email archive overview" i18n:attributes="title"
    i18n:translate=""
    tal:attributes="href string:${site_url}/admin_saved_bulk_emails">
    Back to bulk email archive overview</a></p>

</tal:block>
</tal:block>
