Article View: borland.public.cppbuilder.internet.socket
Article #3489Re: Re. SMTP component
From: Remy Lebeau (TeamB)
Date: Tue, 06 Sep 2005 05:31
Date: Tue, 06 Sep 2005 05:31
32 lines
2397 bytes
2397 bytes
"Jayme Jeffman Filho" <jaymenosp@jeffman.eng.br> wrote in message news:4315ba0e@newsgroups.borland.com... > I'm using C++Builder 6.0 Professional Edition and the Indy > Client and Servers components are present in this edition. An old version of Indy is shipped with BCB6. That version is long outdated and no longer supported. You need to upgrade the version manually from the downloads available on Indy's website. > I am trying to connect to the Google Gmail SMTP server ( > smtp.gmail.com ). Please go to http://www.deja.com and do a search through the newsgroup archives. Samples have been posted several times that show how to connect to GMail via Indy. > The "Connect()" method seems to succeed but in the OnConnected > event, when the application calls the Authenticate() method it raises > an exception telling it was disconnected by the peer. You cannot call Authenticate() inside the OnConnected event. You must wait until after Connect() has exited before calling Authenticate(). This is because Connect() does other work after the OnConnected event has been triggered. Calling Authenticate() inside the OnConnected event completely breaks the flow of commands that TIdSMTP issues to the server automatically. In fact, TIdSMTP already calls Authenticate() automatically inside of Send(), so you do not need to call Authenticate() manually yourself at all. Gambit
Technical Details
Message-ID:
<431d29bf$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!newsread.com!newsprint.newsread.com!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<4314dd65$1@newsgroups.borland.com> <43159970$1@newsgroups.borland.com> <4315ba0e@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,39eadfd5e2d273c7 X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> Newsgroups: borland.public.cppbuilder.internet.socket References: <4314dd65$1@newsgroups.borland.com> <43159970$1@newsgroups.borland.com> <4315ba0e@newsgroups.borland.com> Subject: Re: Re. SMTP component Date: Mon, 5 Sep 2005 22:31:57 -0700 Lines: 34 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 NNTP-Posting-Host: 68.69.17.41 Message-ID: <431d29bf$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1125984703 68.69.17.41 (5 Sep 2005 22:31:43 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!newsread.com!newsprint.newsread.com!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail