hey, i'm making a program to automatically check my inbox for remove's or 
unsubscribe's for my mailing list.. here is the code i am working with and it errors 
out almost everytime. some times it works ok but very rarely.. it gets an error saying 
...

connecting to: mail.tkweb.net
** Script Error: find expected series argument of type: series port bitset
** Where: forall
** Near: if find mail/subject word [
    print ["Found in:" mail/from mail/subject]
    write/append %/C/rebol/remove.txt mail/from
    write/append %/C/rebol/remove.txt ","
    inbox: remove inbox
    break
]
>>

now this one basically checks the subject for any of the words from the word-list, i 
have another one that checks the content and it works fine.. the code is exactly the 
same except the if find state has mail/content instead of mail/subject. i dont know 
why the one with subject acts up. Can anyone please help me! Thanks..

REBOL [
    Title: "Email Sniffer"
    File:  %mailsniff.r
    Date:  10-Sep-1999
    Purpose: {
        Example of how to search all incoming email for
        particular keywords.
    }
    Note: {
        Does not remove the mail from the server.
        Any string (word) may be given, even partial words.
        Strings (words) are not case sensitive.
        FOREACH returns a value, just like other functions.
    }
    Category: [email net 2] 
]

word-list: ["remove" "unsubscribe" "REMOVE" "Remove" "REMOVE!"]

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

forall inbox [
    mail: import-email first inbox
    foreach word word-list [
        if find mail/subject word [
            print ["Found in:" mail/from mail/subject]
            write/append %/C/rebol/remove.txt mail/from
            write/append %/C/rebol/remove.txt ","
            inbox: remove inbox
            break
        ]
    ]
]

close inbox




-------
Koie Smith

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.

Reply via email to