This is the code that i have used for sending an E- mail: But the E-mail sending is getting failed every time plz give your valuable suggestions to solve this problem it's Urgent thanxx.....

    MailMessage mail = new MailMessage();
    mail.From = new MailAddress("");
    mail.Subject = "hello";
    mail.Body = "good one";
    mail.IsBodyHtml = true;
    SmtpClient smtp = new SmtpClient();
    smtp.Host = ""; //Or Your SMTP Server Address

    smtp.Port = 465; //also tried 587
    smtp.Credentials = new System.Net.NetworkCredential
    ("", "***********");  //my id and password      
    smtp.EnableSsl = false;
    Response.Write("<script language='javascript'>alert('MAIL SENT');</script>");

I think there is no need to assign the port.
It might work.
Comment the following code


and then try to send.