I think you can set something like that up on a server using PHP and an IE browser, but it's complicated.
What is done, if your server is Windows based, it should have IE installed on it or you can install it if it's not, you can then use PHP to drop to the OS and run the browser, navigate to the links one by one by 'reading' them off of the page, capturing the each page to a file as you go. You could even concat to one file.
But it just occurs to me typing this, that it might be easier to get the links using a file_get_contents on the main index page for your mailbox and parsing that to get the links you're interested in, then do a loop on those to file_get_contents on each that writes them to a single file, something like (for inside the loop):
You could replace file_get_contents('protocol://domain.com/path/thispage.ext') in the above with a subroutine to get just the text part of the message if you like.
file_put_contents('mymail.txt', file_get_contents('protocol://domain.com/path/thispage.ext'), FILE_APPEND);
Just a general idea.