0

I tried using Appache Commons.Net but it has no Attachments. I also tried using Appache Commons Email but its JDK compliance is 1.5.

I tried using JavaMail 1.4.7 and it works fine in the PC but when I installed it on our device, I am having errors with java.awt.datatransfer.Transferable / java.awt.datatransfer.DataFlavor (NoClassDefFound). I noticed it was included in the activation.jar and it was needed to use JavaMail for devices with JDK 1.4.

Are there any other libraries for free that can send via SMTP with attachments or any fix for the NoClassDef error in JavaMail?

pmark019
  • 1,199
  • 5
  • 15
  • 24

1 Answers1

0

You can use JavaMail 1.4.7, but since Android isn't real Java, you need to add the "additionnal.jar" (yes, whoever created it can't spell), found here.

Bill Shannon
  • 29,579
  • 6
  • 38
  • 40
  • I receive an error: java.lang.UnsupportedClassVersionError: myjava/awt/datatransfer/Transferable (Unsupported major.minor version 49.0)... And I'm not using android. – pmark019 Feb 17 '14 at 02:36
  • My mistake, the problem you described happens on Android. If you're not using Android, I have no idea why you're having that problem, but you definitely should not need the additionnal.jar file. What kind of device are you using and exactly what JDK are you using, where did it come from? The java.awt.datatransfer classes should be in all real versions of the JDK. – Bill Shannon Feb 17 '14 at 08:07