🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.socket
Article #3565

Re: Authenticate problem

#3565
From: Bud Manz
Date: Thu, 01 Sep 2005 19:39
76 lines
3904 bytes
Hi,

I thought a code sample might help...

[code]
                IdMessage1->Body->Text = Memo2->Lines->Text;
                int error;
                AnsiString ErrMsg;
                try
                        {
    	                IdSMTP1->Send(IdMessage1);
                        }
                catch(EIdProtocolReplyError &E)
                        {
                        error = E.ReplyErrorCode;
                        ErrMsg = E.Message;
                        Memo3->Lines->Append(ErrMsg);
                        Memo3->Lines->Append("");
                        }
                catch(EIdConnClosedGracefully &E)
                        {
                        Memo3->Lines->Append(E.Message);
                        Memo3->Lines->Append("");
                        }
                catch(EFOpenError &E)
                        {
                        Memo3->Lines->Append(E.Message);
                        Memo3->Lines->Append("");
                        }
                catch(...)
                        {
                        Memo3->Lines->Append("Unidentified error!");
                        Memo3->Lines->Append("");
                        }
[/code]

Hope this helps...
Bud

"Bud Manz" <amanz@northweststate.edu> wrote:
>
>Ok, Thanks!
>
>I did finally get past that, but now when I finally get to the IdSMTP1->Send(IdMessage1); instruction, the program blows up with an error message that says "...raised exception class EIdProtocolReplyError with message '250 2.1.5 <amanz@northweststate.edu>... Recipient ok'. Process stopped. Use Step or Run to continue.".
>
>Can you (or anyone) help me with this?
>
>Thanks in advance,
>Bud
>
>"Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> wrote:
>>
>>"Bud Manz" <amanz@northweststate.edu> wrote in message
>>news:42e6bf3e$1@newsgroups.borland.com...
>>
>>> If my understanding is correct, the try block will "try" a
>>> block of instruction(s) and return an error code to the catch
>>> block upon completion.
>>
>>No, that is not how exceptions work.  Your understanding is not correct.
>>When an exception is thrown, the code in the try block is not run to
>>completion.  Code execution immediately jumps from the place the exception
>>is thrown to the nearest catch block that knows how to handle the exception.
>>If there is no catch block that can handle the exception, or if a catch
>>block re-throws the exception, then the exception travels up the call stack
>>until the next suitable catch block is found, and so on, until either the
>>exception is finally handled and discarded, or until the exception reaches
>>the system's main exception handler, which usually terminates the process
>>immediately.
>>
>>
>>Gambit
>>
>>
>
Technical Details
Message-ID: <431758ff$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!newshub.sdsu.edu!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad01.newshosting.com!newshosting.com!news-out.newsfeeds.com!propagator3-LAX.newsfeeds.com!news-in.spamkiller.net!news-in.superfeed.net!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <42e67c8d$1@newsgroups.borland.com> <42e687dc$3@newsgroups.borland.com> <42e6bf3e$1@newsgroups.borland.com> <42e7bf3d$1@newsgroups.borland.com> <43171e80$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: "Bud Manz" <amanz@northweststate.edu>
Sender: "Bud Manz" <amanz@northweststate.edu>
Reply-To: "Bud Manz" <amanz@northweststate.edu>
Subject: Re: Authenticate problem
Newsgroups: borland.public.cppbuilder.internet.socket
X-User-Info: 205.133.116.68     
References: <42e67c8d$1@newsgroups.borland.com> <42e687dc$3@newsgroups.borland.com> <42e6bf3e$1@newsgroups.borland.com> <42e7bf3d$1@newsgroups.borland.com> <43171e80$1@newsgroups.borland.com>
NNTP-Posting-Host: 207.105.83.66
Message-ID: <431758ff$1@newsgroups.borland.com>
Date: 1 Sep 2005 12:39:43 -0700
X-Trace: newsgroups.borland.com 1125603583 207.105.83.66 (1 Sep 2005 12:39:43 -0700)
Lines: 77
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!newshub.sdsu.edu!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad01.newshosting.com!newshosting.com!news-out.newsfeeds.com!propagator3-LAX.newsfeeds.com!news-in.spamkiller.net!news-in.superfeed.net!caladan.landsraad.net!newsgroups.borland.com!not-for-mail