Access Pop3 gmail server from a Delphi XE2 application

LeTay
LeTay used Ask the Experts™
on
I try to access a gmail account to read and process incoming emails in Delphi XE2
I activated OPO3 for the gmail account
My code is like this :

begin
  SSL := TIdSSLIOHandlerSocketOpenSSL.Create(Application);
  Pop3 := TIDPop3.Create(Application);
  with Pop3 do
    begin
      AuthType  := patSASL;
      Host      := 'pop.gmail.com';
      UserName  := 'username@gmail.com';
      Password  := 'theusernamepassword';
      Port      := 995;
      IOHandler := SSL;
      UseTLS    := utUseImplicitTLS;
      Connect;
    end;
end;

On the Connect call, I get error EidSASLMechNeed with text (I translate it from french) : SASL mechanism needed for the connection
I have the needed libraries libeay32.dll and ssleay32.dll (dated december 201)

Any idea what is wrong ?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Software architect
Top Expert 2012
Commented:
Look at this article by Remy (Indy) where are few giudes what you need to add to run SASL.

More threads to read on Emb forum:
https://forums.embarcadero.com/thread.jspa?threadID=107724
https://forums.embarcadero.com/thread.jspa?threadID=228965
https://forums.embarcadero.com/message.jspa?messageID=651939

Author

Commented:
Well I am an expert at all in that area
An example to access gmail server with POP should be helpful for me

Author

Commented:
Looks like the third is the good one : https://forums.embarcadero.com/message.jspa?messageID=651939
Will test is now !
Sinisa VukSoftware architect
Top Expert 2012

Commented:
Remy = Indy :-)  So, best person to help. Not much here on EE thought....

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial