Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Send email with attached files, pls help [SMTP/Indy]

Status
Not open for further replies.

StellaIndigo

IS-IT--Management
Sep 19, 2002
118
GB
Hi

I'm trying to attach a file to an email message. I have idSMTP and idMessage working OK but I can't work out how to attach a file from disc, for example "c:\letter.doc" to my email and send it.

Can anyone help?

There are 10 types of people in the world. Those that understand binary and those that don't.
 
Use following code (A touch unusual)

TIDAttachment.Create(IdMessage1.MessageParts,'c:\letter.doc');
TIDAttachment.Create
(IdMessage1.MessageParts,'c:\anotherletter.doc');

Good luck
Simon
 
Cheers matey

I'd been barking up the wrong tree by messing around with the Content... properties in idMessage.



There are 10 types of people in the world. Those that understand binary and those that don't.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top