Discussion:
How do I send attachment Files in Indy?
(too old to reply)
James Williams
2008-07-02 21:51:17 UTC
Permalink
Hello,

I am using Indy 10.1.5.

How to I add an attachment to the TIdMessage. For example, if I want to
send abc.xls excel file as an attachment to a message, how do I do this?



Thanks,

James.
Remy Lebeau (TeamB)
2008-07-03 00:35:18 UTC
Permalink
Post by James Williams
How to I add an attachment to the TIdMessage.
TIdAttachmentFile *attachment = new
TIdAttachmentFile(IdMessage1->MessageParts, "c:\\folder\\abc.xls");
// set additional properties of attachment as needed...


Gambit
James Williams
2008-07-03 20:42:36 UTC
Permalink
How does one get to the file stream so that it can be save once it has been
received in a TIdMessage using the IdPOP3? Is there a save function,
because I am not clear on how this works. I see the SaveToFile but it uses
StoredPathName which would be the path from the receiver end, unless I am
mistaken.

Thanks,


James
Post by Remy Lebeau (TeamB)
Post by James Williams
How to I add an attachment to the TIdMessage.
TIdAttachmentFile *attachment = new
TIdAttachmentFile(IdMessage1->MessageParts, "c:\\folder\\abc.xls");
// set additional properties of attachment as needed...
Gambit
Remy Lebeau (TeamB)
2008-07-03 22:11:29 UTC
Permalink
Post by James Williams
How does one get to the file stream so that it can be save
once it has been received in a TIdMessage using the IdPOP3?
TIdAttachment has a SaveToFile() method.
Post by James Williams
Is there a save function, because I am not clear on how this works.
See above.
Post by James Williams
I see the SaveToFile but it uses StoredPathName which would be
the path from the receiver end, unless I am mistaken.
Yes, you are mistaken. StoredPathName is the local path and filename of the
tempory file that the attachment data was downloaded into.


Gambit

Loading...