title: imap_mail_move copying E-Mails
body: <p>There is a strange behaviour I am noticing with PHP <code>imap_mail_move</code> function. Suppose there are two mails in the inbox folder and I want to move it to a different folder on by one, I am facing some trouble (atleast in gmail).</p>
  
  <p>If I am using </p>
  
  <pre><code>imap_mail_move( $imap_connection, 1, 'ARCHIVE' );
  imap_mail_move( $imap_connection, 2, 'ARCHIVE' );
  </code></pre>
  
  <p>Message 1 tag change from <code>INBOX</code> to <code>IMAP/ARCHIVE</code></p>
  
  <p>Message 2 tag change from <code>INBOX</code> to <code>IMAP/ARCHIVE</code> <code>INBOX</code> (both) rather than just <code>IMAP/ARCHIVE</code></p>
  
  <p>I am unsure why it is happening. Why it is not working as expected second time.</p>
  
  <p>Note: It works properly if I use this code.</p>
  
  <pre><code>imap_mail_move( $imap_connection, 2, 'ARCHIVE' );
  imap_mail_move( $imap_connection, 1, 'ARCHIVE' );
  </code></pre>
  
  <p>or </p>
  
  <pre><code>imap_mail_move( $imap_connection, 1, 'ARCHIVE' );
  $imap_connection = imap_open( $mailbox, $connection_details['username'], $connection_details['password'] );
  imap_mail_move( $imap_connection, 2, 'ARCHIVE' );
  </code></pre>