below is the code I have used for emailing purpose I'am sure it will work
Below is the library file you need to use for this purpose
System.Net.Mail;
before going to code in web.config under configuration section
define host i.e. from which you want to send the message.
every site will have port number i have taken gmail as an example its port number is 587
<system.net>
<mailSettings>
<smtp from="emailid">
<network host="smtp@gmail.com" port="587" userName="username" password="password" />
</smtp>
</mailSettings>
</system.net>
below is the actual code to send mail
string toemail = "email address";
string message = "Hi this is a sample email";
MailMessage mail = new MailMessage();
mail.To.Add(toemail);
mail.Subject = "Sample mail";
mail.Body = message;
mail.IsBodyHtml = false;
SmtpClient smtp = new SmtpClient();
smtp.EnableSsl = true;
smtp.Send(mail);