Solved

how to send email notification in jsp page?

Posted on 2007-11-24
2
2,694 Views
Last Modified: 2013-11-24
Hi,
I have jsp page that contain a form, What i want is :
when user click the submit button: an email notification will be send to (any email)
what is the statment code to do the(send  a notification email ) in jsp ??
thanx
0
Comment
Question by:master_programmer
  • 2
2 Comments
 
LVL 16

Accepted Solution

by:
gnoon earned 500 total points
ID: 20342751
You need to download a java mail library and place it in your classpath. A good one from sun at http://java.sun.com/products/javamail/ and here how to write code to deal with it http://www.vipan.com/htdocs/javamail.html

You can get those receiver e-mail addresses or mail subject from request's parameters.
0
 
LVL 16

Expert Comment

by:gnoon
ID: 20342776
You also need a SMTP server (a computer having a program to send mail installed). If you do not have one, Windows comes with this program in the CD. Here how to install it http://msdn2.microsoft.com/en-US/library/8b83ac7t.aspx. But you may be not able to send mail to internet mail such as hotmail, just in local network (enough for test send mail).
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
groupNoAdj 7 96
map related example 6 49
Custom Java Application connects to database: Which one of the 20? 4 29
String array comparison 4 34
INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question