Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 690419
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T02:26:04+00:00 2026-05-14T02:26:04+00:00

First of all, I am a php developer and most of .net is alien

  • 0

First of all, I am a php developer and most of .net is alien to me which is why I am posting here!

I just migrated over a site from one set of webhosting to another. The whole site is written in .net. None of the site is database driven so most of it works, except for the contact form. The output on the site simple states there was an error with “There has been an error – please try to submit the contact form again, if you continue to experience problems, please notify our webmaster.” This is just a simple message it pops out of it gets to the “catch” part of the email function.

I went into web.config and changed the parameters:

    <emailaddresses>
        <add name="System" value="roeland@hoyespharmacy.com"/>
        <add name="Contact" value="roeland@bythepixel.com"/>
        <add name="Info" value="roeland@bythepixel.com"/>
    </emailaddresses>
    <general>
        <add name="WebSiteDomain" value="hoyespharmacy.com"/>
    </general>

Then the .cs file for contact contains the mail function EmailFormData():

private void EmailFormData()
{
    try
    {
        StringBuilder body = new StringBuilder();
        body.Append("Name" + ": " + txtName.Text + "\n\r");
        body.Append("Phone" + ": " + txtPhone.Text + "\n\r");
        body.Append("Email" + ": " + txtEmail.Text + "\n\r");
        body.Append("Fax" + ": " + txtEmail.Text + "\n\r");
        body.Append("Subject" + ": " + ddlSubject.SelectedValue + "\n\r");
        body.Append("Message" + ": " + txtMessage.Text);

        MailMessage mail = new MailMessage();
        mail.IsBodyHtml = false;
        mail.To.Add(new MailAddress(Settings.GetEmailAddress("System")));
        mail.Subject = "Contact Us Form Submission";
        mail.From = new MailAddress(Settings.GetEmailAddress("System"), Settings.WebSiteDomain);
        mail.Body = body.ToString();

        SmtpClient smtpcl = new SmtpClient();

        smtpcl.Send(mail);
    }
    catch
    {
        Utilities.RedirectPermanently(Request.Url.AbsolutePath + "?messageSent=false");
    }
}

How do I see what the actual error is. I figure I can do something with the “catch” part of the function.. Any pointers?

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T02:26:04+00:00Added an answer on May 14, 2026 at 2:26 am

    Comment out Utilities.RedirectPermanently(Request.Url.AbsolutePath + "?messageSent=false");
    and replace it with throw;

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

First of all, I wrote a simple php page, that picks up some variables
First of all, my ubiquitous language is PHP, and I'm thinking about learning Java.
I'm new to PHP first of all .. My question is once I got
I found this on a website, css_loader.php <?php // First of all send css
First of all, I'm really new to the MVC Asp.Net ideology. I would like
Here's the question first: Is this possible? I'm taking my inspiration from Joe Wrobel's
First of all, sorry for my English :) I'm web developer. Generally coding in
I just redeveloped an existing site from the ground up. The old site used
How do I prevent the posts subsequent from the first from resizing? Ideally, all
First off, I'm a complete novice as a web developer. I have a PHP

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.