Article View: borland.public.cppbuilder.internet.socket
Article #5493TIdMappedPop3's IdMappedPop31OutboundData() event
From: MwnN
Date: Thu, 12 Aug 2004 09:48
Date: Thu, 12 Aug 2004 09:48
38 lines
1874 bytes
1874 bytes
Hi,
I'm trying to edit an email that is being passed throught the
Indys TIdMappedPop3 component.
In the OutboundData() event I can get access to the emails
headers and body via 'AThread->NetData' but I have no idea how
to append the data back to the thread after editing it,or if I
even can, I've tried to do somehting liek the following...
void __fastcall TForm1::IdMappedPop31OutboundData
(TIdMappedPortThread *AThread)
{
if(AnsiContainsText(AThread->NetData, "octets"))
{
AThread->Suspend();
Memo1->Lines->Add(AThread->NetData);
int iStart = Memo1->Lines->IndexOf("Status:"); // start of body
if(iStart!=-1) // edit if found
{
Memo1->Lines->Insert((iStart+1), "Added Text to Email Body");
AThread->NetData = Memo1->Lines->Text;
}
AThread->Resume();
}
}
But it just seems to freeze the program and outlook can't
download the emails at all.
Am I going about this the wrong way or is there someting else
that I need to do in order to edit email bodys.
Thanks again,
MwnN
Technical Details
Message-ID:
<411b3d04$1@newsgroups.borland.com>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-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 11508e,b7c52388824192d,start X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit From: "MwnN" <MwnN@localhost.com> Sender: "MwnN" <MwnN@localhost.com> Reply-To: "MwnN" <MwnN@localhost.com> Subject: TIdMappedPop3's IdMappedPop31OutboundData() event Newsgroups: borland.public.cppbuilder.internet.socket X-User-Info: 147.252.230.61 NNTP-Posting-Host: 207.105.83.66 Message-ID: <411b3d04$1@newsgroups.borland.com> Date: 12 Aug 2004 02:48:52 -0700 X-Trace: newsgroups.borland.com 1092304132 207.105.83.66 (12 Aug 2004 02:48:52 -0700) Lines: 38 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