none
Pop3Client Problem / Question RRS feed

  • Question

  •  I'm using Pop3Client(DLL ver 1.0.3836.24693) in a C# app to retrieve emails. I use the following code

    Pop3Client response = new Pop3Client("username", "pword", "mMailServerIn"); response.OpenInbox(); while( response.NextEmail() ) { // get response subject & body strings

    string subject = response.Subject; /// subject value is garbled

    string body = response.Body; /// body value is good

    }

    //For some reason the above subject value is garbled while the body value is correct

    //when I download the same emails using Outlook Express all is OK

    //what am I doing wrong here??

    Tuesday, August 28, 2012 4:18 PM

Answers

All replies

  • Is Pop3Client a third party control? If yes then probably you should contact the developer or provider's forum (if available).

    Else you can try POP3Client class from following link

    http://www.codeproject.com/Articles/15611/POP3-Email-Client-with-full-MIME-Support-NET-2-0


    Gaurav Khanna | Microsoft VB.NET MVP

    Tuesday, August 28, 2012 6:36 PM
  • Hey,

    the subject line is probably not garbled just encoded.

    Does it look like this?

    =?utf-8?B?V1NVUzogVXBkYXRlc3RhdHVzLVp1c2FtbWVuZmFzc3VuZyB2b24gUFNXV0lOQVVTTDM=?=

    Int that case it's the internet message header encoding extension defined in RFC#2047 which allows you to encode header values in a different character set then US-ASCII:

    =?CHARSET?ENCODING?ENCODED-VALUE?=

    ENCODING can be B (Base64) or Q (Quoted printable).

    Good luck.

    Dariusz

    Thursday, December 19, 2013 2:31 PM