Win a copy of Escape Velocity: Better Metrics for Agile Teams this week in the Agile and Other Processes forum!

ruby mohan

Greenhorn
+ Follow
since Aug 02, 2001
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by ruby mohan

Hello friends,
I have downloaded the java mail package and modified the classpath to include the mail.jar and also the activate.jar file.
I was able to compile the program but if i run it in,
I get Page cannot be displayed error is displayed. I use JavaWebserver2.0 and i want to send the email from my local system(not the server) by using the javax mail package.Could anyone help me in this matter how I can send mail.The code which i compiled is:

import javax.mail.*;
import javax.mail.internet.*;
import javax.servlet.http.*;
import javax.servlet.*;
public class SendMail extends HttpServlet
{
public void doGet(HttpServletRequest req,HttpServletResponse res)
{
try
{
res.setContentType("text/html");
String from="hairuby_tm@yahoo.com";
String to="hairuby_tm@yahoo.com";
String subject="Email Notification";
String cc="ruby_tm@rediffmail.com";
String bcc="ruby_tm@rediffmail.com";
String text="Testing email process";
java.util.Properties prop=System.getProperties();
prop.put("mail.smtp.host","mail.yahoo.com");
Session ses=Session.getInstance(prop,null);
MimeMessage message=new MimeMessage(ses);
try
{
Address fromAddress=new InternetAddress(from);
message.setFrom(fromAddress);
message.setSubject(subject);
Address[] toAddress=InternetAddress.parse(to);
Address[] cc_address=InternetAddress.parse(cc);
Address[] bcc_address=InternetAddress.parse(bcc);
message.setRecipients(Message.RecipientType.TO,toAddress);
message.setRecipients(Message.RecipientType.CC,cc_address);
message.setRecipients(Message.RecipientType.BCC,bcc_address);
message.setSentDate(new java.util.Date());
message.setText(text);
Transport.send(message);
}
catch(Exception e)
{
System.out.println("Error"+e);
}
}
catch(Exception e)
{
}
}
}
Can anyone suggest me what to do if i want to send mail using this program.
Thanks in advance,
bye,
ruby.
21 years ago
Hello friends,
I tried to execute the program which sends mail using the javax.mail package. But when i compiled the program, javax.mail.* package not found message is displayed. What should i do to import this package and compile this program. Could anyone suggests me in this matter. It's very urgent.
Thanks in advance.
bye,
ruby.
21 years ago
Hello friends,
I need the code that sends a dynamically created html page which contains dynamic contents retrieved from the database and where the page does not contain any form elements as an email to the customers various id's which is got from the database.This email must be send either by using jsdk2.0 from my local system and also using Java Web server 2.0. Would anyone help me in this regard.
Thanks for ur reply in advance.
bye,
ruby.
21 years ago
Hello Friends,
I want to send an html page without containing any form
elements as email to the users with different id's retrieved from the database in servlets using local host without using
any web server and also with using Java Web Server 2.0 using
smtp or java mail package. Would anyone help me in this matter.
Thanks for your response in advance,
by,
ruby.
21 years ago