Export all e-mails from a specific mailbox

Is there an apple script that will export all the e-mails I have in a specific mailbox to a txt file?

Take a look at Andreas Amann’s mails scripts