Problem with attachments

Giganews Newsgroups
Subject: Problem with attachments
Posted by:  Paul Exler (p.exl…@equitania.de)
Date: Tue, 15 Mar 2005

Hi,

I use Indy 9.0.18 have a problem with attachments. Normally I have no
problems with reading the attachments, but now I have a Mail-format
which makes problems.

Here is this mail (important is the Content-Transfer-Encoding, I think):

From x…@xxx.de  Tue Mar 15 13:43:14 2005
X-UIDL: LcM!!;P=!!J(M"![U/"!
Return-Path: x…@xxx.de
X-Original-To: x…@xxx.de
Delivered-To: x…@xxx.de
Received: xxxxxxx
From: x…@xxx.de
To: x…@xxx.de
Subject: 1999960
Sender: x…@xxx.de
Mime-Version: 1.0
X-Mailer: 3.2 14035.0318
Content-Type: multipart/mixed;
        boundary="= Multipart Boundary 0315051343"
Content-Transfer-Encoding: quoted-printable
Date: Tue, 15 Mar 2005 12:43:38 GMT
X-Mailer: ICS SMTP Component V2.32
Message-Id: x…@xxx.de
X-Provags-ID: xxx.de x…@xxx.de auth:xxxx
Status: U

This is a multipart MIME message.

--= Multipart Boundary 0315051343
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

--= Multipart Boundary 0315051343
Content-Type: application/octet-stream;
        name="1999960.001"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
        filename="1999960.001"

VU5BOisuPyAnVU5CK1VOT0E6MiswNjIxLzgxNTM2MjoxMitNRVRaTEVSIE1B
SUxTSE9QOjkyKzA1MDMxNToxMzQzK0VZRTAwMSs2ODcyMzpCQidVTkgrTTEr
T1JERVJTOkQ6OTNBOlVOOkRFRVkwMSdCR00rMjIwKzAwMSdEVE0rMTM3OjIw
(I deleted the rest... Normally there are much more lines)

--= Multipart Boundary 0315051343--

The problem is, that Indy doesn't know that there is a Attachment. It
read's it like normal Text.
When I retrieve the Mail in Indy and save it to File, I get the
following result:

Return-Path: <x…@xxx.de>
X-Original-To: x…@xxx.de
Delivered-To: x…@xxx.de
Received: xxxxxx
From: x…@xxx.de
To: prisma-bestelldat…@mailshop.de
Subject: 1999960
Sender: glasbestellung-kund…@prisma-mail.de
MIME-Version: 1.0
X-Mailer: 3.2 14035.0318
Content-Type: multipart/alternative;
boundary="=_MoreStuf_2zzz1234sadvnqw3nerasdf"
Content-Transfer-Encoding: quoted-printable
Date: Tue, 15 Mar 2005 13:43:38 +0100
X-Mailer: ICS SMTP Component V2.32
Message-Id: x…@xxx.de
X-Provags-ID: xxx.de x…@xxx.de auth:xxxx
X-UIDL: LcM!!;P=!!J(M"![U/"!
Status: U

This is a multi-part message in MIME format

--=_MoreStuf_2zzz1234sadvnqw3nerasdf
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

This is a multi-part message in MIME format

--=_MoreStuf_2zzz1234sadvnqw3nerasdf
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

This is a multipart MIME message.

--=_MoreStuf_2zzz1234sadvnqw3nerasdf
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

Content-Type: text/plain; charset"iso-8859-1"
Content-Transfer-Encoding: 7bit

--=_MoreStuf_2zzz1234sadvnqw3nerasdf
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

Content-Type: application/octet-stream;
  name"1999960.001"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
  filename"1999960.001"

VU5BOisuPyAnVU5CK1VOT0E6MiswNjIxLzgxNTM2MjoxMitNRVRaTEVSIE1B
SUxTSE9QOjkyKzA1MDMxNToxMzQzK0VZRTAwMSs2ODcyMzpCQidVTkgrTTEr
T1JERVJTOkQ6OTNBOlVOOkRFRVkwMSdCR00rMjIwKzAwMSdEVE0rMTM3OjIw
(I deleted the rest... Normally there are much more lines)

--=_MoreStuf_2zzz1234sadvnqw3nerasdf--
.

And here is a Mail which is working:

Return-Path: x…@xxx.de
X-Original-To: x…@xxx.de
Delivered-To: xxx@xxxde
Received: xxxx
Message-Id: x…@xxx.de>
From: x…@xxx.de
Subject: 3333333
To: x…@xxx.de
Content-Type: multipart/mixed;
  boundary="=_MoreStuf_2zzz1234sadvnqw3nerasdf";
  charset="ISO-8859-1"
MIME-Version: 1.0
Reply-To: x…@xxx.de
Date: Tue, 15 Mar 2005 12:52:09 +0100
X-UIDL: j#f"!iL,!!dJi!!9(H!!
Status: U
Content-Transfer-Encoding: 7bit

This is a multi-part message in MIME format

--=_MoreStuf_2zzz1234sadvnqw3nerasdf
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

This is a multi-part message in MIME format

--=_MoreStuf_2zzz1234sadvnqw3nerasdf
Content-Type: application/octet-stream;        name="test.jpg";
        name="test.jpg"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;        filename="test.jpg";
        filename="test.jpg"

/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEB
AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/2wBDAQEBAQEBAQEBAQEBAQEBAQEBAQEB
AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/wAARCAEdAvsDASIA
(I deleted the rest... Normally there are much more lines)

--=_MoreStuf_2zzz1234sadvnqw3nerasdf--
.

So I think the problem is that the Mail has:

Content-Transfer-Encoding: quoted-printable
and
Content-Transfer-Encoding: 7bit

The last Mail has only:
Content-Transfer-Encoding: 7bit

Here are my TidMessage-Properties:
AttachmentEncode = MIME
Charset =
ContentDisposition =
ContentTransfer =
ContentType = text/plain
NoDecode = false

Is this a bug or have I wrong settings? What must I do, so that the
Attachment of the first Mail will be detected?

Thanks for every help

Replies