This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes Servlets and the fly likes Sending data into inbox directly. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Sending data into inbox directly." Watch "Sending data into inbox directly." New topic

Sending data into inbox directly.

Anupama Rao

Joined: Aug 04, 2000
Posts: 13
Hello friends.
I have designed an HTML Form and have been sending the data to the database thru a servlet. Now, I intend to send the form contents to the concerned email ID's Inbox. This should be possible. But I don't know how this is done. Can anybody guide me thru this.
Thanks in Advance...
Sandeep Jain
Ranch Hand

Joined: Oct 25, 2000
Posts: 124
This can be done in two ways 1
1) using smtp
2) javax mail package.
//in ur code write this
smtpClient smt=new smtpClient("")//u can give something like also"");
PrintStream pw=smt.startMessage();
pw.println("the message u want to write");
2) refer javamail example found along with javamail package
Sandeep Jain

Try and Try Till u succeed<br /> <br />Sandeep Jain
Anupama Rao

Joined: Aug 04, 2000
Posts: 13
Hi sandeep
Thanks for the response. I will try this out.
ANupama Rao
I agree. Here's the link:
subject: Sending data into inbox directly.
It's not a secret anymore!