Thread View: borland.public.cppbuilder.internet.socket
2 messages
2 total messages
Started by Alfred Thomas
Tue, 27 Jul 2004 10:53
Reading an attachment into a new TIdMessage
Author: Alfred Thomas
Date: Tue, 27 Jul 2004 10:53
Date: Tue, 27 Jul 2004 10:53
9 lines
1211 bytes
1211 bytes
Hi I am receiving e-mails which contains an attachment, which is another e-mail message. what I want to do is read the attachment from one IdMessage into another IdMessage. In the end I want to have an IdMessage that contains the e-mail that was attached to the original IdMessage. Can anyone help? Regards Alfred
Re: Reading an attachment into a new TIdMessage
Author: Remy Lebeau (TeamB)
Date: Tue, 27 Jul 2004 18:19
Date: Tue, 27 Jul 2004 18:19
23 lines
1827 bytes
1827 bytes
"Alfred Thomas" <alfred@fischerint.co.za> wrote in message news:41063424$1@newsgroups.borland.com... > I am receiving e-mails which contains an attachment, which is > another e-mail message. what I want to do is read the attachment > from one IdMessage into another IdMessage. In the end I want > to have an IdMessage that contains the e-mail that was attached > to the original IdMessage. The attached message will be stored in a TIdAttachment within the main TIdMessage's MessageParts collection. In Indy 9, you have to simply save the attachment to a file via the TIdAttachment.SaveToFile() method, and then use the TIdMessage.LoadFromFile() method to load it into a new TIdMessage. In Indy 10, you can set up TIdMessage to store the attached message into a TIdAttachmentMemory instead of a TIdAttachmentFile (the default), then you can use TIdMessage.LoadFromStream() instead of LoadFromFile(). Gambit
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads