Newsgroups : Borland : borland.public.delphi.internet.winsock : 2005 May : Retrieve empty body

www.cryer.info
Managed Newsgroup Archive

Retrieve empty body

Subject:Retrieve empty body
Posted by:"Yassel Omar Izquierdo Souchay" (sioy_..@hotmail.com)
Date:Wed, 18 May 2005 12:19:39

Hi, I' having a big problem.
I'm using Delphi 7.
I'm trying to get body from a message using this:

with IdPOP31 do
begin
Password:=dmdata.cdsConifgpass.Value;
Username:=dmdata.cdsConifguser.Value;
Host:=dmData.cdsConifgpop.Value;
try
//Connec to the server
Connect();
try
//Getting my message
if CheckMessages >0 then
begin
mystatusBar.SimpleText:=msgRetrieving;
AMsg.Clear;
RetrieveHeader(1,AMsg);
Retrieve(1,AMsg); Memo1.Lines.Clear;
Memo1.Lines.Add('Headers');
Memo1.Lines.AddStrings(AMsg.Headers);

AMsg.Headers.SaveToFile(currPath+'\inbox\HeadersMail_'+finalMail+'.txt');
Memo1.Lines.Add('Body');

Memo1.Lines.AddStrings(TIdText(AMsg.MessageParts.Items[0]).Body);

AMsg.Body.SaveToFile(currPath+'\inbox\BodyMail_'+finalMail+'.txt');

TIdText(AMsg.MessageParts.Items[0]).Body.SaveToFile(currPath+'\inbox\BodyMai
l1_M
SGPARTS'+finalMail+'.txt');

.
.
.

And correspondent ending sentences (try and end)

I get, the headers, but the body is empty.
Why?

Somebody can help me please?

Greetings
Yassel
From Argentina.

Replies:

www.cryer.info
Managed Newsgroup Archive