Article View: borland.public.cppbuilder.internet.socket
Article #3511Re: How to connect to a SMTP server using SSL.
From: Remy Lebeau (TeamB)
Date: Fri, 09 Sep 2005 21:49
Date: Fri, 09 Sep 2005 21:49
24 lines
1858 bytes
1858 bytes
"Jayme Jeffman Filho" <jaymenosp@jeffman.eng.br> wrote in message
news:4321e6dd@newsgroups.borland.com...
> I put the code bellow in the IdSMTP::OnConnected event hendler :
Do NOT send any SMTP commands in the OnConnected event hander.
TIdSMTP::Connect() performs various commands after connecting to the server,
namely processing the server's Greeting text and then requesting the
server's capabilities. However, the OnConnected event is triggered before
that processing occurs. If you send your own commands from inside the
OnConnected event, you will corrupt the conversation that TIdSMTP has with
the server. You must wait until Connect() fully exits before doing
anything.
> SMTP->SendCmd("STARTTLS", 220); // jjf Applications hungs here
> SSLHandler->PassThrough = false;
> SMTP->Authenticate();
I suggest you upgrade to Indy 10. TIdSMTP in Indy 10 has native support for
the STARTTLS command.
Gambit
Technical Details
Message-ID:
<43220356$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!news.moat.net!news-out.newsfeeds.com!propagator3-LAX.newsfeeds.com!news-in.superfeed.net!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<4321e6dd@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,6591514d1530cd5c 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: <4321e6dd@newsgroups.borland.com> Subject: Re: How to connect to a SMTP server using SSL. Date: Fri, 9 Sep 2005 14:49:34 -0700 Lines: 26 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: <43220356$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1126302550 68.69.17.41 (9 Sep 2005 14:49:10 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!news.moat.net!news-out.newsfeeds.com!propagator3-LAX.newsfeeds.com!news-in.superfeed.net!caladan.landsraad.net!newsgroups.borland.com!not-for-mail