Runtime error!
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   dave_wong
Posted On:   Monday, July 23, 2001 06:58 PM

hi there, I have a sendmail class that is something like: Properties props = new Properties(); props.put("mail.stmp.host", mailhost); Session session = Session.getDefaultInstance(props, null); session.setDebug(true); msg = new MimeMessage(session); if (from != null) msg.setFrom(new InternetAddress(from)); else msg.setFrom(); msg.setRecipients(Message.RecipientType.TO,InternetAddress.parse(to,false)); if (cc != null) msg.setRecipients(Message.RecipientType.CC,InternetAddress.parse(cc,false)); if (bcc != null) msg.setRecipients(Message.RecipientType.BCC,InternetAddress.parse(bcc,false));    More>>

hi there,


I have a sendmail class that is something like:


			
Properties props = new Properties();
props.put("mail.stmp.host", mailhost);
Session session = Session.getDefaultInstance(props, null);
session.setDebug(true);
msg = new MimeMessage(session);
if (from != null)
msg.setFrom(new InternetAddress(from));
else
msg.setFrom();

msg.setRecipients(Message.RecipientType.TO,InternetAddress.parse(to,false));
if (cc != null)
msg.setRecipients(Message.RecipientType.CC,InternetAddress.parse(cc,false));
if (bcc != null)
msg.setRecipients(Message.RecipientType.BCC,InternetAddress.parse(bcc,false));
msg.setSubject(subject);

this.makeContent();

msg.setHeader("X-Mailer",mailer);
msg.setSentDate(new Date());

Transport.send(msg);


It is ok when I compiled it. However, when I tried it at my html, it got


			
javax.servlet.ServletException: javax/mail/Address
...
java.lang.NoClassDefFoundError: javax/mail/Address

Can anyone help me solve the problem. Thanks


dave

   <<Less

Re: Runtime error!

Posted By:   John_Zukowski  
Posted On:   Tuesday, July 24, 2001 06:22 PM

If I had to guess, I would say your servlet engine doesn't have the mail classes in its CLASSPATH.
About | Sitemap | Contact