Article View: borland.public.cppbuilder.internet.socket
Article #3712Re: Authenticate problem
From: Remy Lebeau (TeamB)
Date: Tue, 26 Jul 2005 18:55
Date: Tue, 26 Jul 2005 18:55
42 lines
2263 bytes
2263 bytes
"Bud Manz" <amanz@northweststate.edu> wrote in message
news:42e67c8d$1@newsgroups.borland.com...
> I am trying to use the TIdSMTP control's Validate() function.
> Can someone point me in the right direction?
What exactly do you need help with about it?
> When I use it in a try block, I can't seem to catch the error,
> the program blows up on me instead.
Please elaborate.
> IdSMTP1->Connect();
> fromAddress = InputBox("Sender Info", "Please insert your email info:",
"Alvin Manz <amanz@northweststate.edu>");
> userID = InputBox("User ID", "Please enter your email user id:\n\t(the
portion before the @ sign)", "amanz");
> userPword = InputBox("Password", "Please enter your email password:", "");
> IdSMTP1->UserId = userID;
> IdSMTP1->Password = userPword;
I would suggest prompting the user BEFORE you connect to the server.
> catch(...)
Depending on your actual version of BCB, '...' may or may not handle VCL
exceptions very well. You should always catch VCL exceptions explicitally,
ie:
catch(const Exception &e)
> exit(0);
NEVER NEVER NEVER NEVER NEVER call exit() in a VCL project!!!!! It does not
allow the VCL to clean up after itself. If you want the application to shut
down, use Application->Terminate() instead, which posts a WM_QUIT message to
the main message queue.
Gambit
Technical Details
Message-ID:
<42e687dc$3@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!newsread.com!newsprint.newsread.com!news-out.newsfeeds.com!propagator3-LAX.newsfeeds.com!news-in.superfeed.net!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<42e67c8d$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,6759d34d895845ed 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: <42e67c8d$1@newsgroups.borland.com> Subject: Re: Authenticate problem Date: Tue, 26 Jul 2005 11:55:38 -0700 Lines: 44 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: <42e687dc$3@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1122404316 68.69.17.41 (26 Jul 2005 11:58:36 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!newsread.com!newsprint.newsread.com!news-out.newsfeeds.com!propagator3-LAX.newsfeeds.com!news-in.superfeed.net!caladan.landsraad.net!newsgroups.borland.com!not-for-mail