title: Why imap uid is not unique? on different folders?
body: <p>I am saving my mailbox elements to a mysql database (to perform fast searches in my intranet, since <code>imap_search'</code> is too slow).</p>
  
  <p>I am connecting to the server and folder, and iterating through messages.</p>
  
  <p>simplified code:</p>
  
  <pre><code>$numMsg = imap_num_msg($conn);
  
  for($i=1;$i&lt;=$numMsg;$i++){
      $uid = imap_uid($conn,$i);
      echo("msg_num:".$i." - uid:".$uid);
  }
  </code></pre>
  
  <p>and I get something like this: </p>
  
  <blockquote>
    <p>msg_num:5 - uid:5msg_num:6 - uid:6msg_num:7 - uid:7msg_num:8 - uid:8msg_num:9 - uid:9msg_num:10 - uid:10msg_num:11 - uid:11msg_num:12 - uid:12</p>
  </blockquote>
  
  <p>which is totally wrong!!! </p>
  
  <p><code>uid</code> isn't supposed to be unique?</p>
  
  <p>I get this UIDs in 5 sub-folders that I have and also in Sent Items, on the Inbox I get uids right <code>(msg_num:5 - uid:1503msg_num:6 - uid:1504msg_num:7 - uid:1506)</code></p>