REBOL [
    Title: "Save Email to File"
    File:  %mailsave.r
    Date:  10-Sep-1999
    Purpose: {
        This example reads all email and saves it to a file.
    }
    Note: {
        Does not remove the mail from the server.
        See the popspec.r file for examples of how
        to setup your mailbox connection.
    }
    Category: [email file net 1] 
]

inbox: open load %popspec.r  ;file contains POP email box info

forall inbox [
    write/append %inbox.txt first inbox
]

close inbox