Problem/Bug with IdPOP3

Giganews Newsgroups
Subject: Problem/Bug with IdPOP3
Posted by:  HHenk (nospam@nospam.com)
Date: Tue, 27 Nov 2007

Hi,

I was experimenting a bit with Indy 10 as supplied with Codegear RAD Studio
2007, latest version.
I use this simple cpp code to receive an email from a pop3 account:

void __fastcall TMainForm::Button6Click(TObject *Sender)
{
  try                {IdPOP31->Connect();}
  catch(Exception &e) {return;}
  int cnt = IdPOP31->CheckMessages();
  if (!cnt) return;
  TIdMessage *msg = new TIdMessage(NULL);
  if (IdPOP31->Retrieve(1, msg)) msg->SaveToFile("mail.eml");
  delete msg;
  IdPOP31->Disconnect();
}

With outlook-express, I did send an email to the email-box. The email
contains an attachment: testfile.csv. This is a text-file with the following
contents (3 lines of 99 characters each).

000000000000000,0000000000,000,00,000000000,000.000,000.000,0.000,0.000,0.000,0.000,000.000,000.000
000000000000000,0000000000,000,00,000000000,000.000,000.000,0.000,0.000,0.000,0.000,000.000,000.000
000000000000000,0000000000,000,00,000000000,000.000,000.000,0.000,0.000,0.000,0.000,000.000,000.000

In the received file mail.eml I, see this (6 lines, line 1, 3 and 5 end with
=):
Note that there is an extra dot (0..000 instead of 0.000)!
When opening mail.eml with outlook, and saving the attachment, the resulting
file also has the 0..000.

000000000000000,0000000000,000,00,000000000,000.000,000.000,0.000,0.00=
0,0..000,0.000,000.000,000.000
000000000000000,0000000000,000,00,000000000,000.000,000.000,0.000,0.00=
0,0..000,0.000,000.000,000.000
000000000000000,0000000000,000,00,000000000,000.000,000.000,0.000,0.00=
0,0..000,0.000,000.000,000.000

When I drag the send email from the outlook-express 'send-items' folder to
the desktop, the email is saved as an .eml file. In this (send) eml file I
see this (6 lines, line 1, 3 and 5 end with =):

000000000000000,0000000000,000,00,000000000,000.000,000.000,0.000,0.000,0=
..000,0.000,000.000,000.000
000000000000000,0000000000,000,00,000000000,000.000,000.000,0.000,0.000,0=
..000,0.000,000.000,000.000
000000000000000,0000000000,000,00,000000000,000.000,000.000,0.000,0.000,0=
..000,0.000,000.000,000.000

To me, it looks like IdPOP3 is inserting an extra dot before the =
character.
I thing this is (an important) bug. Or am I doing something wrong, or is
there a work-around?
Regards, Henk

Replies