Article View: borland.public.cppbuilder.internet.socket
Article #986Re: Assertion Failure when sending email with attachment
From: JLoz
Date: Thu, 21 Jun 2007 12:13
Date: Thu, 21 Jun 2007 12:13
57 lines
3003 bytes
3003 bytes
Here are the lines: 2526: function IndyLength(const ABuffer: String; const ALength: Integer = -1; const AIndex: Integer = 1): Integer; 2527: begin 2528: Assert(AIndex >= 1); 2529: if ALength < 0 then begin 2530: Result := Length(ABuffer)-AIndex+1; 2531: end else begin 2532: Result := Min(Length(ABuffer)-AIndex+1, ALength); 2533: end; 2534: end; Thanks again, "Remy Lebeau (TeamB)" <no.spam@no.spam.com> wrote in message news:4679fa58$1@newsgroups.borland.com... > > "JLoz" <jfsierra@excite.com> wrote in message > news:4679c15b$2@newsgroups.borland.com... > >> The error message I get is >> >> EAssertion Failed with 'Assertion Failure IdGloba.pas Line 2528' > > It would be helpful if you would show what is actually on that line. > There have been so many releases and snapshots of Indy, there is no > way to know which one you are actually using. For instance, there is > no assertion on that line in my copy of IdGlobal.pas. Line 2528 is > inside the TIdLocalEvent constructor. > >> The way the attachments are sent is different from what I was >> accostumed to do with Indy 9 > > Attachments work the same as they did in Indy 9. The only difference > is that Indy 9 supported only file attachments whereas Indy 10 > supports a customizable attachment model. So the TIdAttachment class > is now an abstract base class in Indy 10 and can't be instantiated > directly anymore. TIdAttachmentFile in Indy 10 is the direct > replacement for TIdAttachment in Indy 9. Most of your code that used > TIdAttachment in Indy 9 does not need to change in Indy 10, as the > methods/properties are the same. The only real change you need to > when you instantiate a new attachment, which you already updated that > code. > >> I had problems trying to use IdAttachementFile as it was not being > recognized. > > Then you did not read the documentation, as it tells you which unit > each class/component is declared in. > > > Gambit > >
Technical Details
Message-ID:
<467a6b66$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news2.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<4679c15b$2@newsgroups.borland.com> <4679fa58$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,3c4c62cd0a13406d X-Google-Attributes: gid11508e,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Reply-To: "JLoz" <jfsierra@excite.com> From: "JLoz" <jfsierra@excite.com> Newsgroups: borland.public.cppbuilder.internet.socket References: <4679c15b$2@newsgroups.borland.com> <4679fa58$1@newsgroups.borland.com> Subject: Re: Assertion Failure when sending email with attachment Date: Thu, 21 Jun 2007 08:13:25 -0400 Lines: 59 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.3138 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138 X-RFC2646: Format=Flowed; Original NNTP-Posting-Host: 63.163.143.187 Message-ID: <467a6b66$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1182428006 63.163.143.187 (21 Jun 2007 05:13:26 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news2.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail