User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JSP section within the Web Development category of DaniWeb, a massive community of 392,372 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,671 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JSP advertiser: Lunarpages JSP Web Hosting

Automatic mail using jsp and javamail

Join Date: Aug 2006
Posts: 1
Reputation: nitin saxena is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
nitin saxena nitin saxena is offline Offline
Newbie Poster

Help Re: Automatic mail using jsp and javamail

  #9  
Aug 23rd, 2006
I want to send a mail in my jsp page , but i want that address of the mail to whom i have to send that address is to be send by another jsp page .i am attaching both my jsp
<%
Properties props = new Properties();
props.put("mail.smtp.host", "");
Session s = Session.getInstance(props,null);
MimeMessage message = new MimeMessage(s);
InternetAddress from = new InternetAddress(" ")
message.setFrom(from);
out.println("Kq");

InternetAddress to = new InternetAddress("to ");

out.println("K");
message.addRecipient(Message.RecipientType.TO, to);

message.setSubject("hi");
message.setText(" hello how r u");
Transport.send(message);
%>
In "to" i want address from other jsp , what should i try, i had use session
Last edited by nitin saxena : Aug 23rd, 2006 at 11:51 pm. Reason: wrong code
Reply With Quote  
All times are GMT -4. The time now is 12:59 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC