Click here to Skip to main content
15,887,821 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello all,

There are a lot of articles written that how send email but there is no information about how to receive email. I want to ask, let suppose i am running my webmail with domain as www.webmail.com now if an email is sent on www.webmail.com using yahoo or other email service then how can i receive the email over here. What c# code should be written to receive the email. Kindly help.

Thanks
Posted
Comments
Sergey Alexandrovich Kryukov 10-Jul-12 15:24pm    
First, you need to ask yourself what do you mean by "receiving e-mail". Because ASP.NET works with HTTP (HTTPS), which are not the mail protocols.
--SA

Please see my comment to the question. As ASP.NET works with HTTP (HTTPS), not with e-mail protocols, the question makes no sense. There is nothing to "configure". It would make sense if you simply explained what do you want to do with e-mail (no, "receive" is not an unambiguous definition of it) and what functionality you want. It is possible that you don't need anything related to ASP.NET but need to setup, say, SMTP-based service. Or do you need a Web front-end to a post boxes with stored messages? They you would need to work with SMTP or IMAP.

Please see:
http://en.wikipedia.org/wiki/E-mail[^],
http://en.wikipedia.org/wiki/SMTP[^],
http://en.wikipedia.org/wiki/Mail_server[^], see also "Transfer versus Access" section,
http://en.wikipedia.org/wiki/Post_Office_Protocol[^],
http://en.wikipedia.org/wiki/Internet_Message_Access_Protocol[^].

If you determine for yourself what exactly do you need, you will probably find a lot of help. For example, see on CodeProject:
http://www.codeproject.com/search.aspx?q=POP3+%22C%23%22[^],
http://www.codeproject.com/search.aspx?q=Pop3+%22C%23%22[^].

—SA
 
Share this answer
 
Comments
Shahin Khorshidnia 10-Jul-12 23:59pm    
Perfect, as always. +5
Sergey Alexandrovich Kryukov 11-Jul-12 0:13am    
Thank you very much, Shahin.
--SA
junaidcodeproject 16-Jul-12 12:17pm    
Thanks SA for the clarification.
Your answer put me in the right way.
I shall come with proper question soon.
Probably more than you would ever want to know
http://www.example-code.com/csharp/email.asp[^]
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 10-Jul-12 15:37pm    
Considering that OP failed to find anything on the Web, I'm pretty sure your list will still be the same problem. And this is not because of the lack if information. This is because the question itself makes no sense, as there is no such a notion "receive e-mail in ASP.NET".

I explain it in my answer, please see.
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900