🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Assertion Failure when sending email with attachment

#987
From: JLoz
Date: Thu, 21 Jun 2007 13:50
55 lines
2951 bytes
Gambit,

According to your answer I already changed the code in in theory it should 
work, right?

I tried entering a wrong path and I get an EFOpenError with message 'Cannot 
open file xxx'.  That tells me its trying to open the file.  When the path 
is correct the assertion error occurs in the line

IdSMTP1->Sent(IdMessage1)

Thanks in advance for your help.

JLoz

"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: <467a8244@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <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 09:50:59 -0400
Lines: 57
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: <467a8244@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1182433860 63.163.143.187 (21 Jun 2007 06:51:00 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail