REBOL [
Title: "Search Mail for REBOL Scripts"
File: %mbxscripts.r
Date: 30-May-2000
Author: "Carl Sassenrath"
Purpose: {
Search a mailbox file (e.g. Eudora) for email messages
containing REBOL scripts.
}
Category: [email script util 3]
]
print "Reading mailbox..."
mailbox: read %"/c/program files/qualcomm/eudora mail/in.mbx"
;-- Determine the marker for message separation:
first-line: copy/part mailbox find mailbox newline
parts: parse first-line ""
marker: reform [parts/1 parts/2]
scripts: make string! 100000
parse mailbox [
some [thru marker thru newline copy message to marker
(mail: import-email message
if code: script? mail/content [
print mail/subject
repend scripts [
newline newline
"---------------" newline
"From: " mail/from newline
"Date: " mail/date newline
"Subject: " mail/subject newline
code
]
]
)]
]
write %scripts.txt scripts