• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Sending data into inbox directly.

 
Anupama Rao
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Anupama Rao
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi sandeep
Thanks for the response. I will try this out.
ANupama Rao
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic