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 ?
DelphiGmail

Avatar of undefined
Last Comment
Sinisa Vuk

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Sinisa Vuk

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
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
LeTay

ASKER
Looks like the third is the good one : https://forums.embarcadero.com/message.jspa?messageID=651939
Will test is now !
Sinisa Vuk

Remy = Indy :-)  So, best person to help. Not much here on EE thought....
Your help has saved me hundreds of hours of internet surfing.
fblack61