Hello,
I am attempting to use the mime_parser and conjunction with the pop3 class, so that I can save all attachments from all unread emails (More than 20 attachments at a time).
I'm currently fetching all the message IDs from Gmail using ListMessages. And for every message ID, I call this:
pop3://user:
[email protected]:995/$MessageId?tls=1&debug=1&html_debug=0
This works for the first few messages but it breaks after a certain number of messages by giving me the error: 
Could not retrieve the message: Message number out of range.
Segmentation fault
I echo'ed out the messageID together with the error message, the ID is the same as the one obtained using ListMesssages.
I have the rerun the script a couple of times to get all the attachments.  Any idea why?