My app can send out an email without using an email Intent
or having user interaction. I followed this StackOverflow question to achieve this. Everything has been working fine until recently when the app started crashing when it tried to send an email. The email sender class, which I called Mail
, is defined like this...
public class Mail extends javax.mail.Authenticator {
public Mail() {
// some initialization code
}
public void send() {
// some more code
}
}
For some reason now, whenever I try to create an instance of an object that extends javax.mail.Authenticator
, I get NoClassDefFoundError
. If I remove the javax.mail.Authenticator
extension, I don't get an error when trying to create an instance of Mail
. I also have all the necessary jars included (mail.jar, activation.jar, additional.jar). Does anyone know what's causing this problem and how I can fix it?