BodyText is empty

Jul 2, 2010 at 3:21 PM
Edited Jul 2, 2010 at 3:22 PM

Good day,

I just downloaded the latest 2010/06/22 library, and everything is working perfectly except for the Pop3Client.BodyText property which is empty for only one specific recipient so far.

Here are the values in some of the properties:

  • BodyContent null
  • BodyText ""
  • Contents Count = 0
  • Data "+OK 13821 octets\r\nReturn-Path:..."

Any idea how I can make a workaround to get the BodyText from the "Data" property?

Thanks!

Jul 3, 2010 at 2:50 PM

I debugged through the code, and I think I know where the problem lies.

The following line (165) in the Pop3Message.cs class in the Initialize method seems to return the content parts:

List<String> l = MimeContent.ParseToContentTextList(this.BodyData, this.MultiPartBoundary);

The working message contains the following values:

BodyData:

--_004_F88121C160927B449ADDA10BB106559402CAFCB3DF70sexh001prot_
Content-Type: multipart/alternative;
 boundary="_000_F88121C160927B449ADDA10BB106559402CAFCB3DF70sexh001prot_"

--_000_F88121C160927B449ADDA10BB106559402CAFCB3DF70sexh001prot_
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

PLAIN TEXT HERE

--_000_F88121C160927B449ADDA10BB106559402CAFCB3DF70sexh001prot_
Content-Type: text/html; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

HTML HERE

--_000_F88121C160927B449ADDA10BB106559402CAFCB3DF70sexh001prot_--

--_004_F88121C160927B449ADDA10BB106559402CAFCB3DF70sexh001prot_
Content-Type: image/jpeg; name="image001.jpg"
Content-Description: image001.jpg
Content-Disposition: inline; filename="image001.jpg"; size=5166;
 creation-date="Fri, 02 Jul 2010 14:44:32 GMT";
 modification-date="Fri, 02 Jul 2010 14:44:32 GMT"
Content-ID: <image001.jpg@01CB19F5.4CEC5630>
Content-Transfer-Encoding: base64

BASE64 CODE

--_004_F88121C160927B449ADDA10BB106559402CAFCB3DF70sexh001prot_--

 MultiPartBoundary:

_004_F88121C160927B449ADDA10BB106559402CAFCB3DF70sexh001prot_

The Faulty message contains the following values, and returns 0 items in "List<string> l":

BodyData:

--MCBoundary=_110070215444101301
Content-Type: text/plain; charset=WINDOWS-1252
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

PLAIN TEXT HERE

--
This message has been scanned for viruses and
dangerous content by MailScanner<http://www.mailscanner.info/>, and is
believed to be clean.
--MCBoundary=_110070215444101301
Content-Type: text/html; charset=WINDOWS-1252
Content-Transfer-Encoding: quoted-printable

HTML HERE


--MCBoundary=_110070215444101301--

 MultiPartBoundary:

_110070215444101301

 

Coordinator
Jul 11, 2010 at 6:55 PM

Thank you for your contribution and detail information about this problem.
It will help many people using C#Mail.

Thanks a lot.