Author: rockyy | Posted on: 5/12/2010 1:37:40 AM | Views : 511

I am making a simple contact us page for myslef as whomever wants to contact me can contact me on my gmail or at yahoo.com
my


protected void Button1_Click(object sender, EventArgs e)
{
sendme(TextBox1.Text, TextBox2.Text);
}




private void sendme(string from, string body)
{
string mailserver = "SMTP.MyDomain.Com";
MailMessage message = new MailMessage(from, "rockyy@yahoo.co.in", "feedback", body);
SmtpClient mailclient = new SmtpClient();
mailclient.Host = mailserver;
mailclient.Send(message);
message.Dispose();
}



Whenever i run this code it gives me the following ...

Go to the complete details ...