title: Contact Form Not Working after hosting Asp.net c#
body: <p>I know this question that had been asked before but didn't find an appropriate solution to it yet! I hosted my website a few days ago. Everything works normally in my website a part of my contact form that it doesn't work! 
  The contact form itself doesn't show any errors whatsoever, in fact when I send the details I still get the label message that confirms of sending process, but nothing comes into my email. 
  The strange thing is when I talked to my host provider, he says to me that there is nothing wrong with my script and they didn't block any port.</p>
  
  <p>I also ran the contact page and done the same process by filling all required fields and it works properly.Any help would much appreciated!
  My code : </p>
  
  <pre><code> namespace contact
   {
     public partial class ContactUs : System.Web.UI.Page
      {
        protected void Page_Load(object sender, EventArgs e)
        {
            ScriptManager.ScriptResourceMapping.AddDefinition("jquery", new 
            ScriptResourceDefinition
          {
              Path = "~/scripts/jquery-1.9.1.js"
          });
  
       }
  
       protected void btnSub_Click1(object sender, EventArgs e)
       {
          System.Threading.Thread.Sleep(2000);
  
          try
          {
  
                  if (Page.IsValid)
                  {
                      MailMessage mail = new MailMessage();
                      mail.From = new MailAddress(txtEmail.Text);
                      mail.To.Add("myemailaddress");
                      mail.Subject = txtSubject.Text;
                      mail.Body = "&lt;b&gt; Sender Name: &lt;/b&gt;" + txtName.Text + "  
                   &lt;br/&gt;"
                          + "&lt;b&gt; Sender Email: &lt;/b&gt;" + txtEmail.Text + "&lt;br/&gt;"
                          + "&lt;b&gt; Sender Comment: &lt;/b&gt;" + txtMessage.Text;
                      mail.IsBodyHtml = true;
                      SmtpClient smtpClient = new
              SmtpClient("company's mail", 587);
                      smtpClient.EnableSsl = true;
                      smtpClient.Credentials = new
  
            System.Net.NetworkCredential("myemailaddress","password");
            smtpClient.Send(mail);
  
                      lblmsg.Text = "Thank  you for contacting us";
  
                      txtName.Enabled = false;
                      txtEmail.Enabled = false;
                      txtSubject.Enabled = false;
                      txtMessage.Enabled = false;
                      btnSub.Enabled = false;
  
                  }
  
           }
  
           catch (Exception ex)
           {
              lblmsg.Text = "An unexpected error has occured! " + ex.Message;
           }
        }
  
    }
  </code></pre>