I'm getting the following error during runtime, and I can't find out why ?????
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: javax/mail/Message
at CheckoutPanel.sendHtmlEmail(CheckoutPanel.java:233)
at CheckoutPanel.access$200(CheckoutPanel.java:39)
at CheckoutPanel$CartButtonHandler.actionPerformed(CheckoutPanel.java:182)
...
It is invoke in this part of the code:
import org.apache.commons.mail.HtmlEmail;
import org.apache.commons.mail.EmailException;
...
/** method to automatically send HTML Email (request for assets) */
private void sendHtmlEmail(){
// Create the email message
HtmlEmail email = new HtmlEmail();
try{
email.setHostName("mail.asiatype.com"); //SMTP Server Name
email.addTo("buyer@asiatype.com", "The Buyer"); // recepient
email.setFrom("scastro@asiatype.com", "Lem"); // sender
email.setSubject("Requesting for the following digital assets...");
// set the html message containing request
email.setHtmlMsg(htmlString);
// set the alternative message
email.setTextMsg("Your email client does not support HTML messages");
// send the email
email.send();
}catch(EmailException ee){
ee.printStackTrace();
}
}
}