World: r3wp
[!REBOL3 Schemes] Implementors guide
older newer | first last |
Andreas 9-Jan-2010 [622x6] | . |
use with: s: open pop3://user:[pass-:-server] print read s | |
that should print the num of messages available | |
after that, print pick s 1 would print the first message | |
don't worry to much if it doesn't work, though. the design is stupid, and i'm reworking that at the moment :) | |
too* | |
Graham 9-Jan-2010 [628] | works :) |
Andreas 9-Jan-2010 [629] | nice :) |
Graham 9-Jan-2010 [630] | wait 1 is a linux fix? |
Andreas 9-Jan-2010 [631x2] | yeah, but that's wrong |
that should rather be `wait subport`, just like you do in smtp | |
Graham 9-Jan-2010 [633] | ok |
Andreas 9-Jan-2010 [634x6] | ok, another version up at http://bolka.at/share/prot-pop3.r[temporary url] |
same functionality, improved design | |
the initial read is no longer needed | |
so try with: s: open pop3://... | |
print length? s | |
print pick s 1 | |
Graham 9-Jan-2010 [640] | stuck at the open |
Andreas 9-Jan-2010 [641] | could you try and replace `wait either system/version/4 = 4 [1] [subport]` by just `wait 1` |
Graham 9-Jan-2010 [642] | that works |
Andreas 9-Jan-2010 [643] | interesting |
Graham 9-Jan-2010 [644] | >> write mbox "RETR 1" write ** Script error: copy does not allow char! for its value argument ** Where: write ** Near: write mbox "RETR 1" |
Andreas 9-Jan-2010 [645x2] | you need [] |
and the first item must be solely the command | |
Graham 9-Jan-2010 [647] | eg |
Andreas 9-Jan-2010 [648] | `write mbox ["RETR" 1]` should work |
Graham 9-Jan-2010 [649x2] | shouldn't state always be set to 'retr after all write commands? |
ie. you always want to get the response until you hit the "." | |
Andreas 9-Jan-2010 [651] | that's only for multiline commands |
Graham 9-Jan-2010 [652] | or a "+OK" or a "-ERR" |
Andreas 9-Jan-2010 [653] | STAT, DELE, RSET only have one-line responses |
Graham 9-Jan-2010 [654x2] | NOOP |
QUIT | |
Andreas 9-Jan-2010 [656x3] | (for example, yes) |
actually, WRITE exposes the low-level interface here | |
for RETR, PICK would be the high-level interface | |
Graham 9-Jan-2010 [659] | cause I get nothing back aftre write mbox [ "RETR" 1 ] |
Andreas 9-Jan-2010 [660x3] | etc |
read mbox | |
and you'll get whatever the command handler deems to be the right result to pass along | |
Graham 9-Jan-2010 [663x3] | ahh.... |
write mboxc [ "TOP" 1 10 ] hangs :) | |
after the read ... | |
Andreas 9-Jan-2010 [666] | obviously, as there's no top handling yet :) |
Graham 9-Jan-2010 [667x2] | write mbox [ "TOP" 1 10 ] read mbox not the way it's suposed to work? |
I see the top 10 lines and a "." | |
Andreas 9-Jan-2010 [669x2] | yes, in the debug output :) |
open, length?, pick, close -- that's the currently supported interface | |
Graham 9-Jan-2010 [671] | ok :) |
older newer | first last |