Hello everyone,
I got a form and have to send all the details filled in it through E-mail. I have this code written but its showing error.. please help me out..
using (MailMessage message = new MailMessage())
{
message.From = new MailAddress(TextBox5.Text.ToString());
message.To.Add(new MailAddress("me@mymail.com"));
message.Subject = "test mail" + Label1.Text.ToString();
message.Body = "Name = " + TextBox1.Text.ToString();
message.Body = "Email Address = " + TextBox1.Text.ToString();
message.Body = "Phone Number = " + TextBox2.Text.ToString();
message.Body = "Company = " + TextBox6.Text.ToString();
message.Body = "Zip = " + TextBox4.Text.ToString();
message.Body = "Model = " + TextBox3.Text.ToString();
message.Body = "Serial # = " + TextBox7.Text.ToString();
message.Body = "Parts needed = " + TextBox8.Text.ToString();
message.Body = "Comments = " + TextBox9.Text.ToString();
...
Go to the complete details ...