{ MailMessage objemail = new MailMessage(); objemail.From = new MailAddress("admin@myindianhome.com"); objemail.To.Add(new MailAddress("getabdur4@gmail.com")); objemail.Subject = "New Post Requirement added to our website"; objemail.IsBodyHtml = true; objemail.Body = "<html><head>New Post Requirement</head><body><br/>" + "First Name : " + txtfirstname.Text + "<br/><br/>" + "Last Name : " + txtlastname.Text + "<br/><br/>" + "Email : " + txtemail.Text + "<br/><br/>" + "Mobile No : " + txtmobileno.Text + "<br/><br/>" + "City : " + txtcity.Text + "<br/><br/>" + "Propert Type : " + ddlpropertytype.Text + "<br/><br/>" + "Area : " + txtarea.Text + ddlareaunits.Text + "<br/><br/>" + "Unit Price : " + txtprice.Text + "</body></html>"; objemail.BodyEncoding = System.Text.Encoding.UTF8; objemail.Priority = MailPriority.High; SmtpClient client = new SmtpClient("relay-hosting.secureserver.net"); try { client.Credentials = new System.Net.NetworkCredential("admin@myindianhome.com", "administration"); client.Host = "Host"; client.Port = 25; client.UseDefaultCredentials = false; client.DeliveryMethod = SmtpDeliveryMethod.Network; client.EnableSsl = false; client.Timeout = 20000; client.Send(objemail); } catch (Exception err) { Errmsg.Text = "<b>Unable to send: <font color=\"red\">" + err.Message + "</font></b><br/><br/>"; clear(); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)