Missing Lines within Indy.Sockets.Text

Giganews Newsgroups
Subject: Missing Lines within Indy.Sockets.Text
Posted by:  capachino (jyum7…@hotmail.com)
Date: Tue, 28 Mar 2006

Hello,

I am trying to read a multipart/alternative message and experience problems reading the message parts (both html and plain) from the Indy.Sockets.Text object

I am using ASP.NET and Indy 10.

Here is the VB.NET code i'm using to retrieve the text from the MessagePart

                    text = CType(messagePart, Indy.Sockets.Text)
                    body += text.Body.Text

the body string should be:

----- Original Message -----
From: James XXX
To: XXXX
Sent: Tuesday, March 28, 2006 12:35 PM
Subject: Fw: test

----- Original Message -----
From: James XXX
To: XXXX
Sent: Tuesday, March 28, 2006 12:35 PM
Subject: test

test

but it ends up as:

----- Original Message -----
From: James XXX
To: XXXX
Sent: Tuesday, March 28, 2006 12:35 PM
Subject: Fw: test

Subject: test
test

Am i doing something wrong?  I could grab the contents of the message part to a stream and decode it myself, but I don't know if that's even possible ...

Any help you can provide would be greatly appreciated ...

Below is the original message source: (with personal information removed)

From: "" <>
To: "" <>
Subject: Fw: test
Date: Tue, 28 Mar 2006 12:35:38 -0800
MIME-Version: 1.0
Content-Type: multipart/alternative;
    boundary="----=_NextPart_000_0120_01C65264.1E890020"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180

This is a multi-part message in MIME format.

------=_NextPart_000_0120_01C65264.1E890020
Content-Type: text/plain;
    charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

----- Original Message -----=20
From: James XXX=20
To: XXXX=20
Sent: Tuesday, March 28, 2006 12:35 PM
Subject: Fw: test

----- Original Message -----=20
From: James XXX=20
To: XXXX=20
Sent: Tuesday, March 28, 2006 12:35 PM
Subject: test

test
------=_NextPart_000_0120_01C65264.1E890020
Content-Type: text/html;
    charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.2802" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV>&nbsp;</DIV>
<DIV style=3D"FONT: 10pt arial">----- Original Message -----=20
<DIV style=3D"BACKGROUND: #e4e4e4; font-color: black"><B>From:</B> <A=20
title=3DX…@XXXX.com =
href=3D"mailto:X…@XXXX.com">James=20
XXX</A> </DIV>
<DIV><B>To:</B> <A title=3DXX…@XXXX.com=20
href=3D"mailto:XX…@XXXX.com">XXXX</A> </DIV>
<DIV><B>Sent:</B> Tuesday, March 28, 2006 12:35 PM</DIV>
<DIV><B>Subject:</B> Fw: test</DIV></DIV>
<DIV><BR></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV style=3D"FONT: 10pt arial">----- Original Message -----=20
<DIV style=3D"BACKGROUND: #e4e4e4; font-color: black"><B>From:</B> <A=20
title=3DX…@XXXX.com =
href=3D"mailto:X…@XXXX.com">James=20
XXX</A> </DIV>
<DIV><B>To:</B> <A title=3DXX…@XXXX.com=20
href=3D"mailto:XX…@XXXX.com">XXXX</A> </DIV>
<DIV><B>Sent:</B> Tuesday, March 28, 2006 12:35 PM</DIV>
<DIV><B>Subject:</B> test</DIV></DIV>
<DIV><BR></DIV>
<DIV><FONT face=3DArial size=3D2>test</FONT></DIV></BODY></HTML>

------=_NextPart_000_0120_01C65264.1E890020--

Replies