Recent

Author Topic: [SOLVED] LNet - TCP client, SSL and GMail  (Read 9902 times)

Dibo

  • Hero Member
  • *****
  • Posts: 1048
[SOLVED] LNet - TCP client, SSL and GMail
« on: January 23, 2010, 12:08:32 am »
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
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
« Last Edit: January 24, 2010, 09:25:31 pm by Dibo »

Dibo

  • Hero Member
  • *****
  • Posts: 1048
Re: LNet - TCP client, SSL and GMail
« Reply #1 on: January 24, 2010, 09:24:17 pm »
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: [Select]
const
  CR = #$0d;
  LF = #$0a;
  CRLF = CR + LF;

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

LNet works great :)

Almindor

  • Sr. Member
  • ****
  • Posts: 412
    • http://www.astarot.tk
Re: [SOLVED] LNet - TCP client, SSL and GMail
« Reply #2 on: May 06, 2010, 05:13:27 pm »
Are you writing an IMAP client per-chance? would be great to get it in lNet :)

Dibo

  • Hero Member
  • *****
  • Posts: 1048
Re: [SOLVED] LNet - TCP client, SSL and GMail
« Reply #3 on: May 06, 2010, 06:04:10 pm »
Yes, but I suspended work some time ago :P

 

TinyPortal © 2005-2018