i dont think this is the problem because $pop->message is used to get a particular message and $pop->messages returns a list of all the messages,and it does, but only for a limited no. of messages, after which it returns only the last few messages of the mailbox, as if some sort of paging has been implemented and it gets the messages of only the last page.