Hi All, I am trying a simple send mail application using apache commons library.Here is the code.
The email sending code is working fine in a standalone application.However when I try to run it as android application it gave following error message. trouble processing "javax/naming/AuthenticationException.class": [2009-09-17 05:33:20 - Commons] Attempt to include a core VM class in something other than a core library. It is likely that you have attempted to include the core library from a desktop virtual machine into an application, which will most assuredly not work. If you really intend to build a core library -- which is only appropriate as part of creating a full virtual machine binary, as opposed to compiling an application -- then use the "--core-library" option to suppress this error message. If you go ahead and use "--core-library" but are in fact building an application, then please be aware that your build will still fail at some point; you will simply be denied the pleasure of reading this helpful error message. [2009-09-17 05:33:20 - Commons] 1 error; aborting [2009-09-17 05:33:20 - Commons] Conversion to Dalvik format failed with error 1 I have added mail.jar,commons jars and jndi.jar to the references of eclipse If anybody know a resolution please let me know. *public* *void* onClick(View view) { String[] recipients = {recei...@gmail.com}; SimpleEmail email = *new* SimpleEmail(); email.addTo("sam...@gmail.com", "John Doe"); email.addTo("sam...@gmail.com", "John Doe"); email.setAuthentication("andr...@gmail.com", "android"); email.setHostName("smtp.gmail.com"); email.setDebug(*true*); email.setSmtpPort(465); email.setSSL(*true*); *for* (*int* i = 0; i < recipients.length; i++) { email.addTo(recipients[i]); } email.setFrom("sen...@gmail.com", "Me"); email.setSubject("Test message"); email.setMsg("This is a simple test of commons-email"); email.send(); Thanks & Regards, Isuru --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---