Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Apr : Problem with Indy POP3 message & Attachments

www.cryer.info
Managed Newsgroup Archive

Problem with Indy POP3 message & Attachments

Subject:Problem with Indy POP3 message & Attachments
Posted by:"Mike Hall" (mike.hall@nospampleasemachine-it.com.invalid)
Date:Sun, 23 Apr 2006 12:46:35

I have an application, which has been running sucessfullt for around 18
months, which accepts files by e-mail and uploads an XML attachment to a DB.
The email client is the Indy POP3 client and the message loaded into an
IDmessage.  The .XML attachement is then saved to disk using 'savetofile'
before being processed by my code.

Suddenly, the application has stopped working, and this is due to the
attachment not being decoded by Indy, but saved to disk in MIME format; just
the attachment that is, not the whole file.  When I look at the message
source, nothing appears to be obviously wrong, but the sending client's
format has changed a little and I presume that this has caused the problem.

Outlook & outlook express can parse the message and save the file
sucessfully.  I was using the version of Indy supplied with Delphi 7.  I
have upgraded it to the latest version 9 and the latest 10 (not the
development one).  This has had no effect.  As there seems to be some debate
about Indy's relyability, I downloaded & tried a set of components calling
themselves the 'clever components', but they were also unable to parse the
message.

Unfortunately this problem is blocking an order processing system, so I
would be greateful if anyone can offer a hint as to a solution.  A copy if a
sample message, with confidential elements ***ed out, is shown below.

Many thanks for any assistance,

Mike Hall


Return-Path: *****@*****.com
Received: from mx26.bcrtfl01.us.mxservers.net (131.103.218.104)
by mail15a.boca15-verio.com (RS ver 1.0.95vs) with SMTP id 4-0486627549
for <*****@*****.com>; Mon, 20 Mar 2006 07:25:50 -0500 (EST)
Received: from webmail.*****.com [82.211.113.26] (EHLO *****.uk.*****.com)
by mx26.bcrtfl01.us.mxservers.net (mxl_mta-1.3.8-10p4) with ESMTP id
d4f9e144.3818.153.mx26.bcrtfl01.us.mxservers.net;
Mon, 20 Mar 2006 07:25:49 -0500 (EST)
Received: from dc.*****.com ([***.***.***.***]) by *****.uk.*****.com with
Microsoft SMTPSVC(6.0.3790.1830);
  Mon, 20 Mar 2006 12:25:48 +0000
From: *****@*****.com
To: *****@*****.com
Subject:  *********************
Organization: *****
ReplyTo: *****@*****.com
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="ComputasoftDCmimeBOUNDARY"
Content-Transfer-Encoding: 7bit
Return-Path: *****@*****.com
Message-ID: <BMAIL01UwWpSWerOc0N00000083@*****.uk.*****.com>
X-OriginalArrivalTime: 20 Mar 2006 12:25:48.0408 (UTC)
FILETIME=[6B42EF80:01C64C19]
Date: 20 Mar 2006 12:25:48 +0000
X-Spam: [F=0.0100000000; heur=0.500(900); stat=0.010;
spamtraq-heur=0.500(2006031901)]
X-MAIL-FROM: <*****@*****.com>
X-SOURCE-IP: [***.***.***.***]
X-Loop-Detect:1
X-DistLoop-Detect:1
Status: RO

--ComputasoftDCmimeBOUNDARY
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-NAIMIME-Disclaimer: 1
X-NAIMIME-Modified: 1


  Please see the HTML and XML document attachments for details of your
order.


================================================================
Disclaimer:
This message and any attachments are intended only for the addressee and may
contain information that is confidential or privileged. Unauthorised use is
strictly prohibited and may be unlawful. If you are not the intended
recipient,
or the person responsible for delivering to the intended recipient, you are
not authorised to and must not disclose, copy, distribute, or retain this
message or any part of it. If you have received this email in error, please
delete and advise us immediately. Please email: *****@*****.com including
a copy of the message.

The views expressed in this email are not necessarily the views of *****
Limited, and the company, its directors, officers or employees make no
representation or accept any liability for its accuracy or completeness
unless expressly stated to the contrary.
================================================================

--ComputasoftDCmimeBOUNDARY
Content-Type: application/octet-stream; name="order.htm"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="order.htm"

PGh0bWw+DQo8aGVhZD4NCjxNRVRBIGh0dHAtZXF1
aXY9IkNvbnRlbnQtVHlwZSIgY29udGVudD0idGV4
***** Lines removed*****
MDI4LiANCgkJCQkJCTxicj48YnI+PC9ib2R5Pg0K
PC9odG1sPg0K


--ComputasoftDCmimeBOUNDARY
Content-Type: application/octet-stream; name="order.xml"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="order.xml"

PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0i
VVRGLTE2Ij8+PGJYTUw+PEhlYWRlcj48RnJvbT48
***** Lines removed*****
ICAgICAgICAgICAgICAgICA8L09yZGVyTGFiZWw+
PC9QdXJjaGFzZU9yZGVyPjwvYlhNTD4=


--ComputasoftDCmimeBOUNDARY
Content-Type: application/octet-stream; name="order.txt"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="order.txt"

DQoJCQkNCgkJCVBsZWFzZSBzZWUgdGhlIEhUTUwg
***** Lines removed*****
b3IgZGV0YWlscyBvZiB5b3VyIG9yZGVyLg0KCQkJ
DQoJCQk=


--ComputasoftDCmimeBOUNDARY--

Replies:

www.cryer.info
Managed Newsgroup Archive