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