aspose file tools*
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 Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Sending data into inbox directly." Watch "Sending data into inbox directly." New topic
Author

Sending data into inbox directly.

Anupama Rao
Greenhorn

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
hi,
This can be done in two ways 1
1) using smtp
2) javax mail package.
1)import sun.net.smtp.*;
//in ur code write this
smtpClient smt=new smtpClient("mail.xyz.com")//u can give something like mail.webveda.com also
smt.to("senderemail@something.com");
smt.from("youremail@something.com");
PrintStream pw=smt.startMessage();
pw.println("the message u want to write");
smt.closeServer();
2) refer javamail example found along with javamail package
------------------
Sandeep Jain


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

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: http://aspose.com/file-tools
 
subject: Sending data into inbox directly.