My script is still only working sometimes. I've decided to put IF statements to see what point it's at before sending the next command. My question is: Is there a way to refer to what it has just read, like how other "ON" events use $1- to refer to what triggered the event? Would $sockbr equal the text in the buffer or just a 1 or 0 to show whether there is something in the buffer? Thanks.
I'd like to add checks to make sure it is getting the right response before sending the next command. How/where would I put these into the script I have in this thread?
I'll assume for now that $sockbr will return the contents of the buffer.
if ($sockbr == +OK POP3 server ready.) { sockwrite -n $sockname user UserName }
if ($sockbr == +OK please send PASS command) { sockwrite -n $sockname pass Password }
if ($sockbr == +OK MyName is welcome here) { sockwrite -n $sockname list }
Thanks.