Article View: borland.public.cppbuilder.internet.socket
Article #5636Re: Attachments with TIdMessage
From: Antonio Donato
Date: Mon, 28 Jun 2004 05:12
Date: Mon, 28 Jun 2004 05:12
50 lines
2592 bytes
2592 bytes
Dear Remy, thank you very much, it was done! Let me ask a further question, if we must send more than one attached in a same e-mail, is it possible with TIdAttachment, and what would be the code? Antonio Donato "Remy Lebeau (TeamB)" ha escrito: > "Antonio Donato" <espvida@osite.com.br> wrote in message > news:40DF591C.96CFDE8A@osite.com.br... > > > the code is the following. > > > Note that I did not found at Compenent Palette at > > BC++5 in which I installed Indy any icon to > > TIdAttachment > > TIdAttachment is not a component to begin with, thus it does not appear in > the Component Palette. > > > but there are in it Icons for TIdMessage and TIdSMTP > > Those, on the other hand, ae actual components, thus they appear in the > Palette. > > > Absence of TIdAttachment in Component Palette in > > BC++ is something correct or wrong? > > TIdAttachment is not a component, thus you have to instantiate in code, not > visually at design-time. I already gave you the code to do that. > > > > RichEdit->PlainText=true; > > > RichEdit->Lines->SaveToFile(AnsiString(TmpFileAddress)); > > > IndyMessage->Body->LoadFromFile(AnsiString(TmpFileAddress)); > > You could do the following instead, then you don't need the temporary file > anymore: > > IndyMessage->Body->Assign(RichEdit->Lines); > > > > TIdAttachment *attachment = new TIdAttachment(IndyMessage, AttachTag); > > That should be this instead: > > TIdAttachment *attachment = new TIdAttachment(IndyMessage->MessageParts, > AttachTag); > > Gambit
Technical Details
Message-ID:
<40DFA8CA.7A13AA@osite.com.br>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<40DDCFFC.539C4C06@osite.com.br> <40de01f4$1@newsgroups.borland.com> <40DE437D.F599902C@osite.com.br> <40de5428$1@newsgroups.borland.com> <40DF591C.96CFDE8A@osite.com.br> <40df7374$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,5a2b0d594bbebb99 X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit Message-ID: <40DFA8CA.7A13AA@osite.com.br> Date: Mon, 28 Jun 2004 02:12:42 -0300 From: Antonio Donato <espvida@osite.com.br> X-Mailer: Mozilla 4.78 [es] (Win98; U) X-Accept-Language: es MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.internet.socket Subject: Re: Attachments with TIdMessage References: <40DDCFFC.539C4C06@osite.com.br> <40de01f4$1@newsgroups.borland.com> <40DE437D.F599902C@osite.com.br> <40de5428$1@newsgroups.borland.com> <40DF591C.96CFDE8A@osite.com.br> <40df7374$1@newsgroups.borland.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 200.171.143.68 X-Trace: newsgroups.borland.com 1088400099 200.171.143.68 (27 Jun 2004 22:21:39 -0700) Lines: 51 Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail