Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: pop3 fetch: deleting mails older than 5 days

From: philb::upnaway::com at: 14-Jul-2003 1:56

Hi Rene, Think you can do it. Cant remeber where this code came from .... (RT I think) -------------------------------------------------------------------- attempt: does [ pop: open pop://user:[password--mail--server--com]/ lv-msgs: pop/locals/msg-nums foreach mesg-num lv-msgs [ print ["Message" mesg-num] insert pop/sub-port rejoin [ "TOP " pick pop/locals/msg-nums pop/state/index + mesg-num " 0" ] net-utils/confirm pop/sub-port [ none "+OK" ] headers: pop/handler/read-til-dot pop make string! 1024 lv-em: import-email headers print lv-em/date ] close pop ] attempt -------------------------------------------------------------------- Just need to add the deletion code. Cheers Phil === Original Message === Hi Rene, RSB> I try to write a "fetchmail"-clone. In the "library" I found some few-liners RSB> for deleting mail on the RSB> mail-server. But I want to delete mail older than 5 day and sometimes mail RSB> with a specific "subject". RSB> Hiw can this be solved? I'm not a POP expert by any means, but I think you're going to have to either use TOP or RETR to get the information you want, in order to decide if you want to delete the message. In REBOL, you open the mailbox, import each message, analyze it, and remove it if desired. Using TOP might work as well. Maybe Graham, Phil, or another mail expert can be more helpful. -- Gregg