<?xml version="1.0" encoding="UTF-8"?>
<amapi>
  <request>
    <action>&$(ACTION::xmlapi);</action>
    <status>&$(STATUS::xmlapi);</status>
    <errorCode>&$(ERROR_CODE::xmlapi);</errorCode>
  </request>
  <response>
    <mailbox>&$(IMAP_NAME::xmlapi);</mailbox>
    <folderName>&$(AM_NAME::xmlapi);</folderName>
    <mailboxStatus>
      <unseen>&$(MAIL_UNSEEN_NUMBER::xmlapi);</unseen>
      <exists>&$(MAIL_TOTAL_NUMBER::xmlapi);</exists>
    </mailboxStatus>
    <list>
<#each id="maillist">
      <mail>
        <subject>&e(SUBJECT::xmlapi);</subject>
        <fromList>
          &e(FROM);
        </fromList>
        <toList>
          &e(TO);
        </toList>
        <internalDate>
          <rfc822Date>&e(RFC822DATE::xmlapi);</rfc822Date>
          <year>&e(YEAR::xmlapi);</year>
          <month>&e(MONTH::xmlapi);</month>
          <day>&e(DAY::xmlapi);</day>
          <week>&e(WEEK::xmlapi);</week>
          <hour>&e(HOUR::xmlapi);</hour>
          <minute>&e(MINUTE::xmlapi);</minute>
          <second>&e(SECOND::xmlapi);</second>
          <timezone>&e(TIMEZONE::xmlapi);</timezone>
        </internalDate>
        <imapUid>&e(UID::xmlapi);</imapUid>
        <rfc822Size>&e(SIZE::xmlapi);</rfc822Size>
        <attached>&e(ATTACHED::xmlapi);</attached>
        <imapFlag>
          <priority>&e(PRIORITY::xmlapi);</priority>
          <forwarded>&e(FORWARDED::xmlapi);</forwarded>
          <seen>&e(SEEN::xmlapi);</seen>
          <answerd>&e(ANSWERD::xmlapi);</answerd>
          <flagged>&e(FLAGGED::xmlapi);</flagged>
        </imapFlag>
        <#if>&$(MULTIFOLDER_SEARCH);<#then>
        <search_mailbox>&e(SEARCH_MAILBOX::xmlapi);</search_mailbox>
        <search_folderName>&e(SEARCH_FOLDERNAME::xmlapi);</search_folderName>
        </#if>
      </mail>
</#each>
    </list>
  </response>
</amapi>
