Marechiare wrote: > And why saving emails as text files? Is that what he's trying to do? I thought there was something more complicated going on. I've got a SMTP server that already breaks up each received email message into a text file (and some other stuff), then lets a arbitrary script run that is passed access to the file names and other particulars. Could this be as simple one of these scripts that contains th= e right copy command? James, it might be good if you explain what this code needs to do in more detail. I may have missed the original explanation especially if it was sent during Masters or because it's OT, but the stuff I did see made it sound a lot more complicated than this. What exactly does the database of all the email messages look like? Is it = a collection of text files, one per message? If so, are they organized into directories, like per day, month, year, or something? What exactly must be in these messages other then the message body? Must most of the header other than the FROM: and SUBJECT: lines be stripped? Must they not? Does it matter? What else must be done to the raw SMTP message? Depending on the answers, I may already have something that does exactly what you want that you can have for free. ******************************************************************** Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products (978) 742-9014. Gold level PIC consultants since 2000. --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .