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

[REBOL] Re: [mail] poping headers ... only

From: pwawood:mango:my at: 20-Mar-2004 10:53

Maxim For similar reasons I asked a similar question titled "Email Headers". DideC kindly responded with a script which allows you to download only the email headers. The header information includes the sender, subject. Rebol allows you to determine the size of the message without downloading it. It is my intention to develop a script that will allow me to list the sender, subject and size of messages in my mailbox so that I can delete unwanted ones without downloading them. I have only two obstacles, being totally new to Rebol and too little time to devote to this project at the moment. The code from DideC's reply is: ;--- Will receive the header objects emails: copy [] ;--- open your mailbox mb: open pop://user:[pass--pop--domain] ;--- point on [message-num size-of-message] pairs sizes: mb/locals/sizes ;--- for each message-num and size foreach [mesg-num size] sizes [ ;--- Here we insert "manually" the command not handled by the standard pop:// protocol ; First send the request insert mb/sub-port rejoin ["TOP " pick mb/locals/msg-nums mb/state/index + mesg-num " 0"] ; second, wait for the correct answer net-utils/confirm mb/sub-port [ none "+OK" ] ; then pick in the answer received the message header without the content headers: mb/handler/read-til-dot mb make string! 1024 ;--- Append to the msg block the email orobebject obtained from the string header form append emails import-email headers ] ;--- The result probe emails Peter On Saturday, Mar 20, 2004, at 10:27 Asia/Kuala_Lumpur, Maxim Olivier-Adlhoch wrote: