File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 8 in Action this week in the Java 8 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.
Similar Threads
Multi line messages
How to upload a file along with form data to a database using servlet
data from a form is nt getting inserted
How can we send data from one jsp page to another jsp page
Please Help