You seem to have two different issues here. In the first you are sending mail from ASP.NET, which you seem to have working. In the second you are trying to create a mail client application. Your mail client will need to implement SMTP as described in
RFC 5321[
^], for sending mail.
[edit]
For receiving you need to look at the POP3 protocol as described in
RFC 1081[
^], as Harvey points out below.
[/edit]