I need help please programmers, i need help i don't understand smtp.
____________________________________________
---------------------------------------------------------------
Here is an output==
____________________________________________
protectedvoid Unnamed6_Click(object sender, EventArgs e)
{
MailMessage mailMsg = new MailMessage();
SmtpClient smtp = new SmtpClient();
try
{
mailMsg.From = new MailAddress(Email.Text);
mailMsg.To.Add("admin@mydomain.co.za");
mailMsg.IsBodyHtml = false;
mailMsg.Subject = "Contact Details";
mailMsg.Body = "Contact Details" + "<b>Name:</b>" + names.Text + "<br/> <b>Email - address :</b>" + Email.Text + "<br/> <b>Comments :</b>" + mgs.Text;
mailMsg.Priority = MailPriority.High;
smtp.Host = "localhost";
smtp.Port = 25;
smtp.Credentials = new System.Net.NetworkCredential();
smtp.Timeout = 25000;
smtp.EnableSsl = true;
smtp.Send(mailMsg);
lblStatus.Text = "Thank you. Your contact details and feed back has been submitted.";
}
catch (Exception ex)
{
lblStatus.Text = "Send Email Failed." + ex.Message;
}
}---------------------------------------------------------------
Here is an output==
Send Email Failed.Failure sending mail.