[EMAIL PROTECTED] wrote:

> The problem is that I'm working with things I don't understand and I can't
> find good documentation.  I found some code to connect to an email
> server.  Something like this:
> ----------------------
> x:      [
>             scheme: 'pop
>             user: "srad"
>             pass: "portw"
>             host: "mail.aneurosmith.com"
>         ]
>
> open x
> ------------------------

you can write everything on one line:

mailbox: open pop://srad:[EMAIL PROTECTED]

so the general usage of one line expressions as above is
scheme://username:[EMAIL PROTECTED]

so you have now your mailbox-open. To see what's going on, try first:

trace/net: true

now you can do things as:

length? mailbox
print first mailbox
print last mailbox
print mailbox/3   ; to print third message for e.g.

msg: import-email mailbox/3

print msg/name
print msg/content
print msg/from

or you can see what is all header about by:

print mold system/standard/email

remove mailbox   ; will not remove mailbox, but member on current index
position, so for better readability you can use
remove at mailbox 3 ; will remove third message

clear mailbox ; will delete all your messages
close mailbox ; will close your connection

It's very easy. Just look at some email handling examples at www.rebol.com
script library and examples

HopeThisHelps,

-pekr-

>
>
> I don't understand this array which looks like a structure.  (I still have
> hope that I'll find dictionaries in here somewhere...)  I actually intend
> to process an array of these blocks and generate a report if unable to open
> the connection.  One question is what's going on above?  Is it just a block
> of code to define some variables?  Instead of trying to search the array
> should I just execute it (do?) and then use the variables directly?  That's
> probably it...
>
> Does this language have key-value pair functionality?
>
> Thanks.
>
> Brad

Reply via email to