Indy 10 attachments

Giganews Newsgroups
Subject: Indy 10 attachments
Posted by:  Jack Cane (jwca…
Date: Tue, 21 Feb 2006

I'm a Delphi 6 user and brand new to Indy 10.

Just downloaded and ran the Indy 10 SendMail program from AtoZed. Would like
to include an attachement. Have looked around IndyProject and AtoZed for an
example with attachment but could not find one. A solution posted on contains the following syntax for Indy 9.03 in Delphi 5
(idMsgSend is of type tIdMessage):

TIdAttachment.Create(IdMsgSend.MessageParts, 'dd:\path\file.ext'');

Would appreciate an update giving the correct syntax for Indy 10, and if
possible a working sample that includes 1 or more attachments.