This project is read-only.

BUG: Not works with 1251 encoding

Jan 4, 2010 at 10:24 AM

Return only ?????????? chars :(

Jan 4, 2010 at 4:19 PM

I want to investigate your mail.
Please send me entire mail text or copy it as reply to this post .
You can get entire body text by access Data property of Pop3Message object get by GetMessage method by Pop3Client class.

see the post to get entire body text

Feb 4, 2010 at 10:10 AM

The same for me, I receive messages in "windows-1257" encoding (Lithuania).

I get "?" instead of every custom symbol of my language.

For example, I get: "Labas rytas, ?iandien Rytin?se finans? rin? naujienose:...", but i should get: "Labas rytas, šiandien Rytinėse finansų rinkų naujienose:...".

Upon investigation, I spotted one bug in InternetTextMessage.ParseContentEncoding, when my mentioned "windows-1257" encoding was not parsed at all, because format in message header had spaces:

Content-Type: text/plain; charset = "windows-1257"


// InternetTextMessage.cs

// ParseContentEncoding method

///charset=???; also may contain space: charset = ???;
m = Regex.Match(inLine, ".*charset ?= ?[\"]*(?<Value>[^\"]*)[;\n\r]", RegexOptions.IgnoreCase);

///charset=??? also may contain space: charset = ???
m = Regex.Match(inLine, ".*charset ?= ?[\"]*(?<Value>[^\"]*).*", RegexOptions.IgnoreCase);

// Note that I added " ?" to regex expressions, so now both formats "charset=windows-1257" and "charset = windows-1257" are recognized.
Feb 4, 2010 at 10:18 AM
Edited Feb 4, 2010 at 10:20 AM

Although my above post fixed error when content-encoding was not parsed correctly, I still get ? instead of special symbols. :(

If it will be helpful, I can include raw text of email, as seen from my email client:


Return-path: <>
Received: from ([]) by ispmailbe21 (Cyrus
 v2.3.8) with LMTPA; Wed, 03 Feb 2010 11:07:02 +0200
X-Sieve: CMU Sieve 2.3
Received: from localhost (localhost []) by (Postfix)
 with ESMTP id 3EA7032639 for ; Wed,  3 Feb 2010 11:07:03
 +0200 (EET)
X-Virus-Scanned: amavisd-new at
Received: from ([]) by localhost
 ( []) (amavisd-new, port 10024) with
 ESMTP id WQYMmgIlC6hu for ; Wed,  3 Feb 2010 11:07:02 +0200
Received: from ( []) by (Postfix) with ESMTP id DE4BD30AAD for ;
 Wed,  3 Feb 2010 11:07:02 +0200 (EET)
Date: Wed, 03 Feb 2010 11:07:01 +0200
To: <removed>
From: Finasta 
Reply-To: Finasta 
Subject: =?windows-1257?B?Unl0aW7rcyBmaW5hbnP4IHJpbmv4IG5hdWppZW5vcw==?=
Message-ID: <>
X-Priority: 3
MIME-Version: 1.0
Content-Type: multipart/alternative;
X-Antivirus: avast! (VPS 100202-1, 02/02/2010), Inbound message
X-Antivirus-Status: Clean

Content-Type: text/plain; charset = "windows-1257"
Content-Transfer-Encoding: 8bit

Labas rytas,

ðiandien Rytinëse finansø rinkø naujienose:


Content-Type: text/html; charset = "windows-1257"
Content-Transfer-Encoding: 8bit
// The same content here, only in HTML.
May 1, 2010 at 3:28 AM

Perhaps recent update(2010/4/30) may modify this issue.
Pop3Client class always use encoding ascii in old version.
I add ResponseEncoding property to Pop3Client class.
Set this property UTF-8 and propably you may get correct  char.