Link to home
Start Free TrialLog in
Avatar of LeTay
LeTay

asked on

Access Pop3 gmail server from a Delphi XE2 application

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 ?
ASKER CERTIFIED SOLUTION
Avatar of Sinisa Vuk
Sinisa Vuk
Flag of Croatia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of LeTay
LeTay

ASKER

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

ASKER

Looks like the third is the good one : https://forums.embarcadero.com/message.jspa?messageID=651939
Will test is now !
Remy = Indy :-)  So, best person to help. Not much here on EE thought....