asp.net contact form suddenly stopped working externally
<p>This is an extremely simple contact form that just runs the following code on a button click event. The problem is that inside the network this thing works absolutely fine, but when I try outside nothing is happening, but a 500 server error. What is particularly odd is that this was working A-OK a few days ago. I am guessing this is something perhaps happening with the DNS. My question is , how I can stop this from happening and make this form more stable?</p>

<pre><code>            string toAddress = "me@me.com";
            string fromAddress = "no-reply@mydomain.com";
            string mailServer = "mail.mydomain.com";
            DateTime now = DateTime.Now;
            MailMessage myMailMessage = new MailMessage();
            myMailMessage.To.Add(toAddress);

            myMailMessage.From = new MailAddress(fromAddress);
            myMailMessage.Subject = "Contact Form Submission";
            myMailMessage.Body =
              "some text" + "\r\n" + 
               "-------------------------------------------" +
              "\r\n" +
              "xxx#: " + xxx.Text.ToString() +

              "\r\n" + "FirstName: " + FirstName.Text.ToString() +
              "\r\n" + "LastName: " + LastName.Text.ToString() +
              "\r\n" + "City: " + City.Text.ToString() +
              "\r\n" + "ListPrice: " + ListPrice.Text.ToString() +
              "\r\n" + "Features: " + Features.Text.ToString() +
              "\r\n" 

            SmtpClient mySmtpClient = new SmtpClient(mailServer);

            mySmtpClient.Send(myMailMessage);

            Response.Redirect("thankyou.aspx");
</code></pre>
