mail help?

Howdy guys,

I check my mail with REBOL all the time.  With barely modified
example scripts.  I want to make another modification, but I'm
having trouble with it.

How do I identify the "from" field, while the mail is still on the
server, and then based on that write to a different file?  The
script I use is pretty much just "mailboxsave.r".
Here's part of it:

while [not tail? inbox] [
    mail: import-email message: first inbox
            write/append file rejoin [
                        "From " mail/from spc
                                        pick days when/weekday spc
                                                        pick months when/month spc
                                                                        pick pad 
when/day < 10
when/day spc
        pick pad when/time < 10:00  when/time spc
                        when/year
                                        newline first inbox newline
                                                ]

I'm thinking that I can change the value of "file" conditionally..
if mail/to = "address@com" file: thisfile
and so on.
would I put that in a block? where in the while loop would it go?
am I even on the right track?

I hope REBOL's around for years and years--might take me that long
to "get it" !

thanks,

-t

Reply via email to