Login  
Search All Forums
Dart Home | PowerTCP Winsock for ActiveX | Custom Development Reply | PowerTCP Winsock for ActiveX Topics | Forums   
AuthorForum: PowerTCP Winsock for ActiveX
Topic: Winsock Tool and POP uidl Command
gianluca
gianluca@geoweb.it

From: rome, Italy
Posts: 3
Member Since: 06/08/06
posted September 14, 2007 3:40 AM

Hi there I'm here again with the same question.
I'm trying to implement an asp page that could be able to browse mailboxes in a fixed domain and retrieve a list of unique identifiers for mails in a mailbox (let us assume the name of the mailbox is goofy@domain.it).
In order to obtain the above mentioned list I thought to try with the command UIDL. The problem is: If I submit the command with telnet (PORT 110) what we retrieve is the entire list of all the 803 unique identifiers expected followed by ".".
However if I try the same command in the following statements

If InStr(PAGE,"+OK") Then
Tcp1.Send "uidl " & VbCrLf
End If
s = ""
Tcp1.Receive s
Page = Page + s
response.Write Page &"<hr>"

all I get is only the list truncated at the 78th occurence.
 Have you any Idea?
Thank You in advance.
Gianluca
Mike Baldwin (Admin)



From: Rome, NY USA
Posts: 114
Member Since: 04/11/00

Extra Support Options
Custom Application Development

posted September 14, 2007 1:46 PM

If you repeated call Tcp1.Receive until you receive the ".", then you'll get all the data.
gianluca
gianluca@geoweb.it

From: rome, Italy
Posts: 3
Member Since: 06/08/06
posted September 17, 2007 5:15 AM

Thanks a lot Mike!
I followed your suggestion and stroke the target!
The correct code is
-----------------------------
page="":s = ""
Tcp1.Send "uidl " & VbCrLf
Do Until  InStr(page,".")
s=""
 Tcp1.Receive s
 Page = Page + s
Loop

Response.Write "<b>"&Page&"</b>" 
--------------------------------- 
Thank you again.
Reply | PowerTCP Winsock for ActiveX Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX