Forum > Networking and Web Programming

[SOLVED] LNet - TCP client, SSL and GMail

(1/1)

Dibo:
Hi,
I'm trying to connect to the Gmail IMAP server. Connecting is doing well, server respond:

--- Quote ---* OK Gimap ready for requests from 83.XXX.XX.XX 435dfsdfsdfsdsdfmum.3
--- End quote ---
But when I try to send any command (example "* LOGIN somelogin somepassword") I'm not getting any response in the event OnReceive. I have linked LSSLSessionComponent to LTCPClient. Doing this same in linux console (http://samj.net/2008/07/proof-gmail-imap-gimap-supports-imap.html) working OK. What I'm doing wrong?
Regards

Dibo:
Solved the problem. I read IMAP protocol documentation more closely and I saw how sending TIMAPSend (synapse). Each instruction must be completed by CRLF string, example:


--- Code: ---const
  CR = #$0d;
  LF = #$0a;
  CRLF = CR + LF;

begin
  LTCPComponent1.SendMessage('A001 LOGIN ' + editLogin.Text + ' ' + editPass.Text + ' ' + CRLF);
end;

--- End code ---

LNet works great :)

Almindor:
Are you writing an IMAP client per-chance? would be great to get it in lNet :)

Dibo:
Yes, but I suspended work some time ago :P

Navigation

[0] Message Index

Go to full version