[REBOL] Newbie: some questions about VID
From: philb:upnaway at: 27-Sep-2003 22:28
You need to move "show emails" down 1 line outside the if count = 0 block.
Use the pwd/data with the hide attribute.
A couple of suggestions :
1. You could use compose to compose the user:[password--server-name]
something like ....
mb: compose [scheme: 'pop host: (pop-server) user: (user) pass: (password)]
2. You can use import-email to parse the email for you.
Constructs an email object from an email message.
IMPORT-EMAIL is a function value.
data -- The email message (Type: string)
The email object returned has all the fields you want To/From/Subject
=== Original Message ===
in the following trial program I have a few difficulties using VID.
how can I fill out the text-list. The results never show up
I tried the "hide"attribute on the pwd field; if I print the pwd field,
I don't see the actual value,
but only the *******. How to get (and print) the real value ?
Arie van Wingerden
================ The program: ==================
REBOL [ ]
lay: layout [
style lab label 100 right
vh2 "Provide your e-mail account information" return
lab "Userid" uid: field return
lab "Password" pwd: field return
lab "POP3 server" pop: field return
lab button "Fetch e-mails" [fill] return
lab "E-mails" emails: text-list 600x200 return
fill: does [
mails: read/lines to-url rejoin [ "pop://" uid/text ":" pwd/text "@"
foreach mail mails [
count: count + 1
insert emails/data rejoin [ "===== mail #" count " =====" ]
parse mail [ thru "From:" copy from to "^/" ]
insert emails/data rejoin [ "From :" from ]
parse mail [ thru "Date:" copy date to "^/" ]
insert emails/data rejoin [ "Date :" date ]
parse mail [ thru "Subject:" copy subject to "^/" ]
insert emails/data rejoin [ "Subject:" subject ]
if count = 0 [
insert emails/data " --- no e-mails found ---"