php imap_search NEW
<p>Trying to get NEW messages with imap_search on local server, but getting ALL messages.</p>

<pre><code>$inbox = imap_open($hostname,$username,$password) or die ('Cannot connect to mail server: ' . imap_last_error());
$emails = imap_search($inbox,'NEW');
</code></pre>

<p>Also if I trying to get UNSEEN I'm getting all messages.
And If I open this box in squirrel - I see that all messages are readed.</p>

<p>My task is to get NEW messages from inbox and process them.</p>
