Get all messages or a specific number of messages from a folder