0

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?

Community
  • 1
  • 1
Brian
  • 7,955
  • 16
  • 66
  • 107

1 Answers1

0

If this problem happens after an ADT update you should look at this post.

You have in fact to create a libs folder to put all your libraries and the build path will be managed by Eclipse.

eyal-lezmy
  • 7,090
  • 3
  • 41
  • 35