In this topic, I want to give a tutorial: How to send mail with the help of ASP.NET. Through these codes, you can make your own mail transfer system. Actually you are building a mediator, which helps another account and password to forward your mail to given id. Before writing this code, please get your port id. Like for Google/ Gmail its 587. Here I am gonna use my gmail account. Lets see.
First make a page. Say contact.aspx.
Make a button, ay Submit. And on click, write these codes. And add these library to your cs file. So lets create contact.aspx.cs page.
In place of “mypassword” give your password for the mail id you are using to send (I used firstname.lastname@example.org). Any query, drop a comment.