Timiun wrote:
> Hey!
>
> I got a rather anoying problem here.
> I'm making a webmail application, that collects webmail from
> different POP3 servers. Fine - it works - allmost.
>
> The problem is encoding - or should I say lack of (i think)
> When Outlook 2003 (danish) sends email, it encodes in iso-8859-1
> When my mailserver (mercury/32) recives the mail, all ok, but when my
> ASP.NET page retrives the mail from the server, it gets this (and
> displays this):
>
> *******************************************
> =C6=F8=E5 =C6=D8=C5
>
> S=E6delighed er ikke s=E5 sv=E6rt over =F8en
> N=F8j - s=E5 =E6der hun den
How do you retrieve E-mail from those POP3 server? Assuming you're
receiving bytes by a network stream, one proper way to decode them is
byte[] bytes = ... // stuff you receive via POP3
System.Text.Encoding iso88591 = System.Text.Encoding.GetEncoding(28591);
String mail = iso88591.GetBytes(bytes);
Cheers,
--
Joerg Jooss