Article View: borland.public.cppbuilder.internet.socket
Article #5620Re: Reading an attachment into a new TIdMessage
From: 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
Technical Details
Message-ID:
<41069c56$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<41063424$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,ac834eced1301354 X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Remy Lebeau \(TeamB\)" <gambit47.no.spam@no.spam.yahoo.com> Newsgroups: borland.public.cppbuilder.internet.socket References: <41063424$1@newsgroups.borland.com> Subject: Re: Reading an attachment into a new TIdMessage Date: Tue, 27 Jul 2004 11:19:12 -0700 Lines: 25 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 NNTP-Posting-Host: 68.69.17.41 Message-ID: <41069c56$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1090952278 68.69.17.41 (27 Jul 2004 11:17:58 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail