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 8213103
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T10:59:53+00:00 2026-06-07T10:59:53+00:00

I have a form that the users for my website will fill out. Once

  • 0

I have a form that the users for my website will fill out. Once they click submit the information they filled out is supposed to be sent to my email. For some reason the information they fill out is not being sent. I am posting the code below. For a while it was working, but I must have changed something simple when I was trying to get other parts of the code to work and now I can’t figure it out.

 protected void Submit_Click1(object sender, EventArgs e)
    {
        try
        {


            string strMessage = "Bug Name: " + txtBugName.Text.Trim() 
                                             + "<br/>" + "Module Name: " + ddlModule.SelectedValue 
                                             + "<br/>" + "Page Name: " + ddlPage.SelectedValue 
                                             + "<br/>" + "Description: " + txtComments.Text.Trim() 

                                             + "<br/>" + "Email is" + " " + txtemail.Text.Trim() 
                                             + "<br/>" + "The request was sent at" +   



            SendMessage(ConfigurationManager.AppSettings["EmailAddrTo"],
                ConfigurationManager.AppSettings["EmailAddrFrom"],
                txtBugName.Text.Trim(),
                strMessage, "", "");
        }
        catch 
        {

        }
    }

As you can see I have this code pulling the information they fill out and then also I am formatting it for the email that will be sent to myself. But now I just get a blank email or actually the subject line will have something, but the email will be blank.

Also at the bottom of the code you can see i put this email was sent at + dandt I am trying to have the date and time sent in that part is there any code I can just put there to send the date and time the email was sent at? Like is there any syntax specifically just for date and time?

Thank you all

  • 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-06-07T10:59:54+00:00Added an answer on June 7, 2026 at 10:59 am

    You’re swallowing the exception. Remove the try/catch to see any errors that may occur as you change your code; only apply exception handling after testing.

    Verify your method signature (params) here because that’s where the mistake lies:

    UPDATE:

    You need to pass the parameters in the following order (read the link below):

    public void Send(
        string from,
        string to,
        string subject,
        string body
    )
    

    SmtpClient.Send Method (String, String, String, String)

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

Sidebar

Related Questions

On my site, I have a form that users fill out to become a
Okay, next PHPExcel question. I have an HTML form that users fill out and
Okay all, I have a form that I want users to fill out. When
I have a website form that collects url of users to store in a
(Using MySQL and PHP) I have a search form that will allow my users
I have a form that users are able to fill in and want to
I have a classifieds website, and when posting a new classified users fill out
I have a dynamic form that users can add/delete sets of input fields. I
I have a form that allows users to enter a date of birth: ie:
I have an admin form that lets users create entities that require an image.

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.