Gordon Waters wrote:
> I am trying to use Indy10 (D2005 Pro) to send an email with an 
> attachment, I have searched a few places and keep getting the same code 
> to use.

Make sure you're getting code for Indy 10. There were a lot of 
architectural changes between version 9 and version 10. Old code no 
longer compiles. It's usually just a question of finding how units and 
classes have been renamed. Good thing you have the source code, which 
means you can look at exactly how things are implemented.

> TidAttachment.Create(IdMessage,'Name of Attachment');
> 
> However I keep getting a compile error, [Error] : E2034 Too many actual 
> parameters
> on the TidAttachment.Create line.
> 
> If I take off the name of the attachment it will compile, but errors 
> with an ABSTRACT error.

Then it's logical to conclude that TIdAttachment is an abstract class. 
When I look at the source files that come with Indy, I see not only 
IdAttachment.pas but also IdAttachmentFile.pas and 
IdAttachmentMemory.pas, so that leads me to think TIdAttachment is the 
base class for two other attachment classes, one that gets its contents 
from a file on disk, and another that gets its contents directly from 
memory. That's just a guess, though, based on the names of the files. 
Feel free to check out the code for yourself.

-- 
Rob
_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi

Reply via email to