after a few unsuccessful attempts to get this listed i decided to post it
here.

i needed a reliable biff program in beos. the advantage is that it works
under linux and windows also :)

feel free to add to it or make suggestions. this was a quickie program. i
`learned' just enough rebol to write it

==========================================================================
REBOL [
    Title: "rbiff 0.0.7"
    File:  %rbiff.r
    Date:  6-Sep-1999
    Author: "tony summerfelt"
    Purpose: {check to see if any email is on your server}
    Note: "does not delete email."
]

user: "username"
pass: "password"
popserver: "@your.server.com"
before_checking: 60
init: 0

print ""
print ["Checking server at" now]
mailbox: open join pop:// [user ":" pass popserver]
msg: length? mailbox
count: 1
print ""

while [1]
[

     either all [not error? try [mail: import-email first mailbox] init < msg]
     [ 
              print count
              if mail/from  [print ["   From:" mail/from]]
           if mail/subject [print ["  " mail/subject]]
           print  ""
           mailbox: next mailbox
                 count: count + 1
                 init: init + 1
         ][
              close mailbox
              wait before_checking
                 print ""
              print ["Checking server at" now]
              mailbox: open join pop:// [user ":" pass popserver]
              newmsg: length? mailbox
              if newmsg > msg
              [
                 if not error? try [mail: import-email last mailbox]
                    [
                       print count
                    if mail/from  [print ["   From:" mail/from]]
                       if mail/subject [print ["  " mail/subject]]
                 print  ""
                       mailbox: next mailbox
                          count: count + 1
                       msg: newmsg
                    ]
               ]
         ]
         
]
close mailbox
quit
==========================================================================

-- 
*--------------------------------------
|
|'you want a toe? i can get you a toe.'
|
*-----------------------

Reply via email to