views:

327

answers:

3

I have used the smtp class to send emails through code.

Can I use the classes in the .net framework to display emails received on a page without having to use something like exchange sdk?

How would I go about using gmail pop and smtp server information in .net web apps (with the .net classes) to send and receive email?

+1  A: 

Yes, it's possible. You'll probably find it easier to use one of the many third-party components which are available and encapsulate much of the logic you would otherwise need to develop.

I like Chilkat's email component. They provide an online example showing how to use their component to access a Gmail inbox via POP3. They also have an IMAP component which you might find useful.

Ian Nelson
I would not like to use any 3rd party frameworks or libraries, i would imagine that the credentials along with the pop/smtp info should get me access to the mail box.I would however like programmatic access - to be able to sort through mails based on subject - time ....
Nick
Fair enough, if you want to spend vast amounts of time writing your own POP3 component instead of paying to use an existing one that's your choice. It could be an interesting learning experience. Personally, my time is too valuable to waste reinventing the wheel.
Ian Nelson
+1  A: 

Read this

How to POP3 in C#

Ramesh Soni
+1  A: 

You cannot retrieve email from a remote server in .net without any 3rd party libraries.

.Net only includes SMTP support, for POP and IMAP you must use another library. (or roll your own.)

BTW this question applies to any mail server/service not just gmail.

Y Low