By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,719 Members | 1,811 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,719 IT Pros & Developers. It's quick & easy.

Retrieving and parsing emails from Pop3 server using C#

P: n/a
I am making a thin email client and want to get emails from a pop3
server...Is there any built in support in C# to get emails from a pop3 server
and parse the email to show up on the UI ?


Jul 25 '07 #1
Share this Question
Share on Google+
4 Replies


P: n/a
No built-in support for a Pop3 client, no.

--
HTH,

Kevin Spencer
Microsoft MVP

Printing Components, Email Components,
FTP Client Classes, Enhanced Data Controls, much more.
DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net

"Alpana" <Al****@discussions.microsoft.comwrote in message
news:1E**********************************@microsof t.com...
>I am making a thin email client and want to get emails from a pop3
server...Is there any built in support in C# to get emails from a pop3
server
and parse the email to show up on the UI ?


Jul 25 '07 #2

P: n/a
Hi Kevin,

Thanks for your response.

I have manged to write a client that retrieves the mails from the pop3
server using TcpClient and Pop3 APIs, but what I get is a raw email. Since
the email format I assume is standard could you suggest a way to parse it so
as to access the relevant data like subject, from, to and message body... Any
sort of classes available in C# for such parsing functionality... If no, what
would be the best way to go about it?

Alpana

"Kevin Spencer" wrote:
No built-in support for a Pop3 client, no.

--
HTH,

Kevin Spencer
Microsoft MVP

Printing Components, Email Components,
FTP Client Classes, Enhanced Data Controls, much more.
DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net

"Alpana" <Al****@discussions.microsoft.comwrote in message
news:1E**********************************@microsof t.com...
I am making a thin email client and want to get emails from a pop3
server...Is there any built in support in C# to get emails from a pop3
server
and parse the email to show up on the UI ?




Jul 26 '07 #3

P: n/a
Hi Alpana,

First, congratulations on writing a POP3 client. Good show. Now, I'm afraid
you'll have to write your own parser. The SMTP protocol defines the
structure of an email message as a text file. So, you'll have to write your
own parser for this. It is a bit more complicated, because an Internet
Message may be pure text or HTML, and may have attachments of various types
(MIME types), which will need to be decoded from the Base64 text format they
are stored in. An HTML email message may also have references and links to
external resources, such as images.

The good news is, if you can write your own POP3 client, I'm sure you can
handle writing an Internet Message parser as well. Here are a couple of
links to the standards references to help you get started:

http://www.faqs.org/rfcs/rfc2822.html
http://www.faqs.org/rfcs/rfc2045.html

--
HTH,

Kevin Spencer
Microsoft MVP

Printing Components, Email Components,
FTP Client Classes, Enhanced Data Controls, much more.
DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net

"Alpana" <Al****@discussions.microsoft.comwrote in message
news:69**********************************@microsof t.com...
Hi Kevin,

Thanks for your response.

I have manged to write a client that retrieves the mails from the pop3
server using TcpClient and Pop3 APIs, but what I get is a raw email. Since
the email format I assume is standard could you suggest a way to parse it
so
as to access the relevant data like subject, from, to and message body...
Any
sort of classes available in C# for such parsing functionality... If no,
what
would be the best way to go about it?

Alpana

"Kevin Spencer" wrote:
>No built-in support for a Pop3 client, no.

--
HTH,

Kevin Spencer
Microsoft MVP

Printing Components, Email Components,
FTP Client Classes, Enhanced Data Controls, much more.
DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net

"Alpana" <Al****@discussions.microsoft.comwrote in message
news:1E**********************************@microso ft.com...
>I am making a thin email client and want to get emails from a pop3
server...Is there any built in support in C# to get emails from a pop3
server
and parse the email to show up on the UI ?




Jul 26 '07 #4

P: n/a
Hi Alpana ...

perhaps you want to check this out:
http://www.codeproject.com/useritems/Pop3MailClient.asp

greets
Daniel
Jul 27 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.