Re: Attachments not working after installing Indy 10 for Delphi7

Giganews Newsgroups
Subject: Re: Attachments not working after installing Indy 10 for Delphi7
Posted by:  David Moorhouse (delphiREMO…@NO_SPAMmoorhouse.co.nz)
Date: Fri, 19 Jan 2007

Alan Davies,

<snip>
>      begin        //send mail if report available
>// error here
>        TIdAttachment.Create(Mailmessage.MessageParts, edAttachment.Text);
>//
<snip>

Try using TIdAttachmentFile in the IdAttachmentFile.pas file.

TIdAttachment is now an abstract ancestor object and should not be
instantiated.  You can instantiate either TIdAttachmentFile for files
that exist/will exist on disk, or TIdAttachmentMemory
(IdAttachmentMemory .pas) for memory (stream) based manipulation of
attachments.

Take a look at the source ...

HTH

D
David Moorhouse
Moorhouse Works ltd
www.moorhouse.co.nz

Replies

In response to

Attachments not working after installing Indy 10 for Delphi7 posted by Alan Davies on Thu, 18 Jan 2007