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

  • SEARCH
  • Home
  • 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 9271333
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T15:35:43+00:00 2026-06-18T15:35:43+00:00

I am having the registration form.After submitting it goes to another JSP page where

  • 0

I am having the registration form.After submitting it goes to another JSP page where it gets the data of that form and stores it in my database.Now i want to send the email to the user id which he has given for the confirmation.I don’t have any idea about it. please get me code for it.
This is my registration form action and submit code.

<form action="signupdata.jsp" method="POST">
<input type="submit" onclick="" value="submit">

This is on signupdata.jsp to save the data in my database.

int i=st.executeUpdate("insert into userdetails(firstname,lastname,email,password,cpassword,category) values('"+fname+"','"+lname+"','"+emal+"','"+pwd+"','"+cpwd+"','"+ctgry+"')");

Now I want to send the email of confirmation to the user’s email ID like most of websites provides.

  • 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-18T15:35:44+00:00Added an answer on June 18, 2026 at 3:35 pm

    Write below code in firtPage.jsp

    <form action="signupdata.jsp" method="POST">
    Please enter email : <input type="text" name="email">
    <input type="submit" onclick="" value="submit">
    </form>
    

    Write below code in signupdata.jsp

          // Recipient's email ID needs to be mentioned.
          String to = request.getParameter("email");
    
          // Sender's email ID needs to be mentioned
          String from = "SENDER_EMAIL";
    
          // Assuming you are sending email from localhost
          String host = "YOUR_EMAIL_HOST";
    
          // Get system properties
          Properties properties = System.getProperties();
    
          // Setup mail server
          properties.setProperty("mail.smtp.host", host);
    
          // Get the default Session object.
          Session session = Session.getDefaultInstance(properties);
    
          try{
             // Create a default MimeMessage object.
             MimeMessage message = new MimeMessage(session);
    
             // Set From: header field of the header.
             message.setFrom(new InternetAddress(from));
    
             // Set To: header field of the header.
             message.addRecipient(Message.RecipientType.TO,
                                      new InternetAddress(to));
    
             // Set Subject: header field
             message.setSubject("SUVJECT_LINE");
    
             // Now set the actual message
             message.setText("YOUR MESSAGE GOES HERE");
    
             // Send message
             Transport.send(message);
             System.out.println("Sent message successfully....");
          }catch (MessagingException mex) {
             mex.printStackTrace();
          }
       }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Actually I am having one registration form & one settings page. After entering some
I have a registration form that when the user enters in valid registration data
I'm having trouble with cookies on my site's registration form. When a user creates
But I'm having trouble with a new user registration form. Can someone explain this
I am having a registration page. when the page is loaded, everytime it tries
I have a registration form that uses an old version of the FB API.
I am having a problem with Google Chrome. I have a jQuery Registration form:
So I made a registration form such that the user must select one of
I have a nested user registration form. I'd like to insert data for 3
I am using jquery having two panel in my form one is Registration panel

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.