Sub Activity_Create(FirstTime As Boolean)
Socket1.Initialize("Socket1")
Socket1.Connect("alt4.gmail-smtp-in.l.google.com",25,40000) '"whois-check.ausregistry.net.au" , 43, 20000)
End Sub
Sub Socket1_Connected (Successful As Boolean)
If Successful = False Then
Msgbox(LastException.Message, "Error connecting")
Return
End If
Dim tr As TextReader
Dim tw As TextWriter
tr.Initialize2(Socket1.InputStream,"UTF8")
tw.Initialize2(Socket1.OutputStream,"UTF8")
Do Until tr.IsInitialized
DoEvents
Loop
DoEvents
Do Until tw.IsInitialized
DoEvents
Loop
DoEvents
Dim sb As StringBuilder
sb.Initialize
Do Until sb.IsInitialized
DoEvents
Loop
Do Until tr.Ready
DoEvents
Loop
sb.Append(CRLF).Append(tr.Readall)
Do While tr.Ready
sb.Append(CRLF).Append(tr.Readall)
Loop
Msgbox (sb.ToString ,"")
Socket1.Close
End Sub